I'm using EntityFramework(EF) with Asp.Net for creating one website, In that I've Created the .edmx and .tt and DBContext.
Also I've done Get all records by using this method in my repo class,
StudentManagementEntities _db;
public Repo()
{
_db = new StudentManagementEntities();
}
public object GetAllStudents()
{
return _db.People.Select(s => s).ToList();
}
I don't know how to do other operations like Insert, Update, delete etc.,
would somebody tell me the linq for that or else give me any examples link...
.Select(s => s)does absolutely nothing useful and you can remove it.GetAllStudents()to returnIEnumerable<Student>, notobjectStudentsarePeople, but are allPeopleStudents?