public static BaseBrandModel ToBaseBrand(this Brand brand) { BaseBrandModel _result = new BaseBrandModel(); _result.Id = brand.Id; _result.BrandName = brand.BrandName; _result.Manufacturer = brand.Manufacturer; _result.Narration = brand.Narration; _result.CreatedDate = brand.CreatedDate; _result.ModifiedDate = brand.ModifiedDate; return(_result); }
public static Brand ToBrand(this BaseBrandModel brand) { Brand _result = new Brand(); if (brand.Id.HasValue) { _result.Id = brand.Id.GetValueOrDefault(); } _result.BrandName = brand.BrandName; _result.Manufacturer = brand.Manufacturer; _result.Narration = brand.Narration; _result.CreatedDate = brand.CreatedDate; _result.ModifiedDate = brand.ModifiedDate; return(_result); }