I am using a table adapter to generate a typed dataset. I used the wizard to create a method named "GetAllUsersCount" in dal which calls a stored procedure which has the following code ----
SET NOCOUNT ON
;
SELECT
COUNT(*) AS Expr1
FROM
tenderdigest.UserInfo
using this code in the procedure the wizard creates a method named "GetAllUsersCount" which returns "int?" , which is i expect.
But later , i created another procedure with code ---
SET NOCOUNT ON
;
SELECT
COUNT(*) AS Expr1
FROM
tenderdigest.UserInfo where email = @email
which the adpater generates as "GetCountByEmail" which return an "object" which is unexpected. I used same procedure to create both methods in DAL but one returns int? and one object, which is certainly not what i want.
So, what can i do to force the TableAdaper return the value as the same datatype like int?, string, DateTime? or anything else as i want? Plz help.