public Staffs GetStaffMemberByID(int id) { Staffs staffMember = ctx.Staffs.Where(x => x.Id == id).FirstOrDefault(); return(staffMember); }
public void RemoveStaffMember(Staffs staffMember) { ctx.Staffs.Attach(staffMember); ctx.Staffs.Remove(staffMember); ctx.SaveChanges(); }
public void UpdateStaffMember(Staffs staffMember) { ctx.Entry(staffMember).State = EntityState.Modified; ctx.SaveChanges(); }
public void InsertStaff(Staffs staffMember) { ctx.Staffs.Add(staffMember); ctx.SaveChanges(); }