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
Guest User
Tech Writer
2.1k
466.7k
System.InvalidOperationException
Sep 22 2020 3:11 AM
Hi Team
I have this following model, every time i am trying to run my controller its complain about the data type being non-null value be set to System.Int32. How do i solve this issue? this data type is set as float type.
public
ActionResult SearchPeopleDetails()
{
RegCoursesViewModel regCoursesView =
new
RegCoursesViewModel();
return
View(cb.RegPeopleLists.ToList());
// Exception is here by run time.
}
public
class
eNtsaRegPeopleLists
{
public
string
Name {
get
;
set
; }
[Key]
public
int
LoginID {
get
;
set
; }
public
string
SISID {
get
;
set
; }
public
string
Role {
get
;
set
; }
public
DateTime LastActivity {
get
;
set
; }
public
int
? TotalActivity {
get
;
set
; }
// I did this before public float TotalActivity {get;set;}
Reply
Answers (
1
)
how we insert data in database using PHP?
how to reset identity column sequentially after deleting any row .