10 TIPs - To Become a Good Developer/Programmer
Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Mark Tabor
928
1.7k
314.3k
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.