//To Update the records of a particluar AgencyList public int UpdateAgencyList(AgencyList agency) { db.Entry(agency).State = EntityState.Modified; db.SaveChanges(); return(1); }
//To Delete the record of a particular AgencyList public int DeleteAgencyList(int id) { AgencyList agency = db.AgencyList.Find(id); db.AgencyList.Remove(agency); db.SaveChanges(); return(1); }
//To Add new AgencyList record public int AddAgencyList(AgencyList agency) { db.AgencyList.Add(agency); db.SaveChanges(); return(1); }