I found This Error when I run This Progrmae
"
Server Error in '/' Application.
The data reader is incompatible with the specified 'DBLaxmiTatkalModel.TblAttendence'. A member of the type, 'AttendenceId', does not have a corresponding column in the data reader with the same name.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.EntityCommandExecutionException: The data reader is incompatible with the specified 'DBLaxmiTatkalModel.TblAttendence'. A member of the type, 'AttendenceId', does not have a corresponding column in the data reader with the same name.
Source Error:
Line 244: {
Line 245:
Line 246: var data = objentity.Attendence(EmployeeId).Take(1).ToList();
Line 247:
Line 248: return data;
Source File: D:\laxmitatkal project\12-4-2014\7-4-2014\LaxmiTatkal.BussinesLogic\EmployeeBl.cs Line: 246
"
my sql server procedure is
"
CREATE PROCEDURE [dbo].[Attendence]
@EmployeeId int
as
if not exists(select * from TblAttendence where convert(varchar(10) ,CreateDate,23) =convert(varchar(10) ,GETDATE(),23) and EmployeeId =@EmployeeId)
select * from TblAttendence where convert(varchar(10) ,CreateDate,23) =convert(varchar(10) ,GETDATE(),23) and EmployeeId =@EmployeeId
Else
update TblAttendence set LastLoginTime=GETDATE() where EmployeeId=@EmployeeId and convert(varchar(10) ,CreateDate,23) =convert(varchar(10) ,GETDATE(),23)
GO
"