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);
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