public ResponseModel Save(Employee employee) { using (VirtualTraineesEntities db = new VirtualTraineesEntities()) { db.Employees.Add(employee); db.SaveChanges(); } return(new ResponseModel()); }
public ResponseModel Save(Teacher teacher) { using (VirtualTraineesEntities db = new VirtualTraineesEntities()) { db.Teachers.Add(teacher); db.SaveChanges(); } return(new ResponseModel()); }
public ResponseModel GetAll() { using (VirtualTraineesEntities db = new VirtualTraineesEntities()) { List <Student> students = db.Students.ToList(); return(new ResponseModel() { Data = students }); } }
public ResponseModel GetAll() { using (VirtualTraineesEntities db = new VirtualTraineesEntities()) { List <Employee> employees = db.Employees.ToList(); return(new ResponseModel() { Data = employees }); } }
public ResponseModel GetAll() { using (VirtualTraineesEntities db = new VirtualTraineesEntities()) { List <Teacher> teachers = db.Teachers.ToList(); return(new ResponseModel() { Data = teachers }); } }