コード例 #1
0
        public static BillItem Create(BillItemModel dto)
        {
            var entity = new BillItem();

            entity.Id           = dto.Id;
            entity.Name         = dto.Name;
            entity.Total        = dto.Total;
            entity.PricePerUnit = dto.PricePerUnit;
            entity.Quantity     = dto.Quantity;
            entity.BillId       = dto.BillId;
            //entity.CreatedBy = dto.CreatedBy;
            //entity.CreatedOn = dto.CreatedOn;
            //entity.LastUpdatedBy = dto.LastUpdatedBy;
            //entity.LastUpdatedOn = dto.LastUpdatedOn;
            return(entity);
        }
コード例 #2
0
        public static BillItemModel Create(BillItem entity)
        {
            var dto = new BillItemModel();

            dto.Id           = entity.Id;
            dto.Name         = entity.Name;
            dto.Total        = entity.Total;
            dto.PricePerUnit = entity.PricePerUnit;
            dto.Quantity     = entity.Quantity;
            dto.BillId       = entity.BillId;
            //dto.CreatedBy = entity.CreatedBy;
            //dto.CreatedOn = entity.CreatedOn;
            //dto.LastUpdatedBy = entity.LastUpdatedBy;
            //dto.LastUpdatedOn = entity.LastUpdatedOn;
            return(dto);
        }