public static Supply DatabaseSupplyToServiceSupply(Data.Supply supply) { return(new Supply() { Id = supply.id, Date = supply.supply_time, ProductId = supply.product, ProductAmount = supply.product_amount }); }
public void AddSupply(Data.Supply supply) { _DataContext.Supplies.Add(Mapper.DatabaseSupplyToServiceSupply(supply)); }