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
Mark Tabor
587
2k
457.1k
Why Context Return Null in entity framework
May 1 2019 3:56 AM
why validate return null although i have it
public
Registration ValidateUser(
string
userName,
string
passWord)
{
try
{
using
(var _context =
new
DatabaseContext())
{
var validate = (from user
in
_context.Registration
where user.Username == userName && user.Password == passWord
select user).SingleOrDefault();
var users=_context.Registration;
return
validate;
}
}
catch
(Exception)
{
throw
;
}
}
public
DbSet<Registration> Registration {
get
;
set
; }
and in db i have Registration table with records
Reply
Answers (
3
)
How to hide column which have null values in gridview.
Error while deletion of data in gridview.