コード例 #1
0
 /// <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
     });
 }
コード例 #2
0
ファイル: OilService.cs プロジェクト: asaddurrani/OCM
 public Oil Save(Oil oil)
 {
     var oilReturn = _oilRepository.Save(oil);
     return oilReturn;
 }