TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kiran Kumari
NA
142
12.7k
I have got error in MVC?
Jun 18 2019 2:57 AM
hi everyone
i want to get data from my storeprocedure i am calling but i get this message
The data reader is incompatible with the specified 'SH_SDTModel.SP_DashBoardReports_Result'. A member of the type, 'SNo', does not have a corresponding column in the data reader with the same name.
below are my code where i called this SP
public
IList<SP_DashBoardReports_Result> GetLblValues()
{
SH_SDTEntities databaseee =
new
SH_SDTEntities();
var data5 = databaseee.SP_DashBoardReports(Convert.ToDateTime(
"1/1/2019"
), Convert.ToDateTime(
"6/1/2019"
),
"JobWiseStatus_SUM"
).ToList();
if
(data5 !=
null
)
{
return
data5;
}
else
return
null
;
}
i placed debugger and got error on this stage
public
virtual
ObjectResult<SP_DashBoardReports_Result> SP_DashBoardReports(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo,
string
mode)
{
var dateFromParameter = dateFrom.HasValue ?
new
ObjectParameter(
"DateFrom"
, dateFrom) :
new
ObjectParameter(
"DateFrom"
,
typeof
(System.DateTime));
var dateToParameter = dateTo.HasValue ?
new
ObjectParameter(
"DateTo"
, dateTo) :
new
ObjectParameter(
"DateTo"
,
typeof
(System.DateTime));
var modeParameter = mode !=
null
?
new
ObjectParameter(
"Mode"
, mode) :
new
ObjectParameter(
"Mode"
,
typeof
(
string
));
return
((IObjectContextAdapter)
this
).ObjectContext.ExecuteFunction<SP_DashBoardReports_Result>(
"SP_DashBoardReports"
, dateFromParameter, dateToParameter, modeParameter);
}
how can i solve this can anyone solve this???
Reply
Answers (
5
)
How to embed images in email body with auto download
multiple file upload in entity framework !