Пример #1
0
        public static M.Supplier ToSupplier(this AddSupplierModel model, M.Supplier supplier)
        {
            supplier.Name         = model.Name;
            supplier.Tel          = model.Tel;
            supplier.Address      = model.Address;
            supplier.BusinessTime = new M.BusinessTime(model.BusinessTimeStart.ToTime(), model.BusinessTimeEnd.ToTime());

            supplier.Coordinates = new M.Coordinates(model.CoordinatesLongitude, model.CoordinatesLatitude);

            supplier.DeliveryTime = NullHelper.IfNull(model.DeliveryTime, new DeliveryTime[0]).Select(m => m.ToDeliveryTime()).ToArray();

            return(supplier);
        }
Пример #2
0
 public static M.Supplier ToSupplier(this AddSupplierModel model)
 {
     return(ToSupplier(model, new M.Supplier()));
 }