public TransportEntity FromDomainToEntity(Transport domainObject) { return(new TransportEntity { Speed = domainObject.Speed, ID = domainObject.ID, DeliveryType = deliveryTypeMapper.FromDomainToEntity(domainObject.Type), InTheShop = domainObject.InTheShop, TransportType = _transportTypeMapper.FromDomainToEntity(domainObject.TransportType) }); }
public ProductEntity FromDomainToEntity(Product domainObject) { ProductEntity productForDB = new ProductEntity(); productForDB.ID = domainObject.ID; productForDB.Name = domainObject.Name; productForDB.Price = domainObject.Price; productForDB.Volume = domainObject.Volume; productForDB.Weight = domainObject.Weight; productForDB.TimeForPreparation = domainObject.TimeForPreparation; productForDB.DeliveryType = deliveryTypeMapper.FromDomainToEntity(domainObject.Type); return(productForDB); }