Sunday, June 2, 2019

LINQ Status with Any and condition in firstOrDefault

1. Status by Any
     bool status = db.Employee.Any(x => x.emp_id == 1);

2. Condtion in FirstOrDefault
     Employee employee = db.Employee.FirstOrDefault(x => x.emp_id == 1);

No comments:

Post a Comment

When web application with sql server connection using sql client, working in visual studio but not working in localhost as in iis

Error:  The EXECUTE permission was denied on the object 'StoredProcedureTest1', database 'testDb1', schema 'dbo'.  C...