public Detail Edit(Detail detail)
 {
     db.Entry(detail).State = EntityState.Modified;
     db.SaveChanges();
     return(detail);
 }
 public void Remove(Detail detail)
 {
     db.Details.Remove(detail);
     db.SaveChanges();
 }
 public Detail Save(Detail detail)
 {
     db.Details.Add(detail);
     db.SaveChanges();
     return(detail);
 }