コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }