/// <summary> /// Create web model from entity /// </summary> public static Models.Oil CreateFrom(this MainDomain.Oil source) { return(new Models.Oil { OilId = source.OilId, OilAverageMilage = source.OilAverageMilage, OilDescription = source.OilDescription, OilMakerId = source.OilMakerId, OilName = source.OilName, OilNetWeightId = source.OilNetWeightId, OilPower = source.OilPower, OilPrice = source.OilPrice, OilMakerCompanyName = source.OilMakerCompany != null ? source.OilMakerCompany.OilMakerName : string.Empty }); }
public Oil Save(Oil oil) { var oilReturn = _oilRepository.Save(oil); return oilReturn; }