Beispiel #1
0
        //To Update the records of a particluar AgencyList
        public int UpdateAgencyList(AgencyList agency)
        {
            db.Entry(agency).State = EntityState.Modified;
            db.SaveChanges();

            return(1);
        }
Beispiel #2
0
        //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);
        }
Beispiel #3
0
 //To Add new AgencyList record
 public int AddAgencyList(AgencyList agency)
 {
     db.AgencyList.Add(agency);
     db.SaveChanges();
     return(1);
 }