public bool Update(UpdateCapacity item) { using (Context context = new Context()) { EfCapacityRepository rep = new EfCapacityRepository(context); CapacityConvert convert = new CapacityConvert(context); return(rep.Update(convert.ToEntity(item))); } }
public ReadCapacity Add(CreateCapacity item) { using (Context context = new Context()) { EfCapacityRepository rep = new EfCapacityRepository(context); CapacityConvert convert = new CapacityConvert(context); return(convert.ToRead(rep.Add(convert.ToEntity(item)))); } }