Ejemplo n.º 1
0
 public int Update(LiveMedsEntity.Prescription prescription)
 {
     LiveMedsEntity.Prescription mn = this.context.Prescriptions.SingleOrDefault(m => m.PrescriptionId == prescription.PrescriptionId);
     mn.PrescriptionCategoryName = prescription.PrescriptionCategoryName;
     return(this.context.SaveChanges());
 }
Ejemplo n.º 2
0
 public int Delete(int id)
 {
     LiveMedsEntity.Prescription mn = this.context.Prescriptions.SingleOrDefault(m => m.PrescriptionId == id);
     this.context.Prescriptions.Remove(mn);
     return(this.context.SaveChanges());
 }
Ejemplo n.º 3
0
 public int Insert(LiveMedsEntity.Prescription prescription)
 {
     this.context.Prescriptions.Add(prescription);
     return(this.context.SaveChanges());
 }