//Get the details of a particular friend public Owes GetOwesData(int id) { try { Owes owes = db.Owes.Find(id); return(owes); } catch { throw; } }
//To Add new employee record public int AddOwes(Owes owes) { try { db.Owes.Add(owes); db.SaveChanges(); return(1); } catch { throw; } }
//To Delete the record of a particular employee public int DeleteOwes(int id) { try { Owes frd = db.Owes.Find(id); db.Owes.Remove(frd); db.SaveChanges(); return(1); } catch { throw; } }
//To Update the records of a particluar friend public int UpdateOwes(Owes owes) { try { db.Entry(owes).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }