public virtual int Update(Medicine Medicines) { AutoMapper.Mapper.CreateMap<Medicine, Medicine>(); var Medicinetr = Context.Medicines.First( x => x.MedicineId == Medicines.MedicineId); var mapped = AutoMapper.Mapper.Map<Medicine>(Medicinetr); Context.SaveChanges(); return mapped.MedicineId; }
public virtual int Add(Medicine medicines) { Context.Medicines.Add(medicines); Context.SaveChanges(); return medicines.MedicineId; }
public int Add(Medicine Medicines) { MedicineModel = (Medicine)Medicines; MedicinesServices.Add(MedicineModel); return MedicineModel.MedicineId; }
public int Update(Medicine Medicines) { MedicineModel = (Medicine)Medicines; MedicinesServices.Update(MedicineModel); return MedicineModel.MedicineId; }
public MedicinesContracts() { MedicineModel = new Medicine(); MedicinesServices = new MedicinesServices(); }