/// <summary> /// Converts this instance of <see cref="SalesDetail"/> to an instance of <see cref="SalesDetailDTO"/>. /// </summary> /// <param name="entity"><see cref="SalesDetail"/> to convert.</param> public static SalesDetailDTO ToDTO(this SalesDetail entity) { if (entity == null) { return(null); } var dto = new SalesDetailDTO(); dto.SalesDetailsId = entity.SalesDetailsId; dto.InvoiceDate = entity.InvoiceDate; dto.InvoiceNo = entity.InvoiceNo; dto.ShopId = entity.ShopId; dto.ProductAttributeId = entity.ProductAttributeId; dto.Quantity = entity.Quantity; dto.Amount = entity.Amount; dto.UserId = entity.UserId; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="SalesDetailDTO"/> to an instance of <see cref="SalesDetail"/>. /// </summary> /// <param name="dto"><see cref="SalesDetailDTO"/> to convert.</param> public static SalesDetail ToEntity(this SalesDetailDTO dto) { if (dto == null) { return(null); } var entity = new SalesDetail(); entity.SalesDetailsId = dto.SalesDetailsId; entity.InvoiceDate = dto.InvoiceDate; entity.InvoiceNo = dto.InvoiceNo; entity.ShopId = dto.ShopId; entity.ProductAttributeId = dto.ProductAttributeId; entity.Quantity = dto.Quantity; entity.Amount = dto.Amount; entity.UserId = dto.UserId; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="SalesDetail"/> converted from <see cref="SalesDetailDTO"/>.</param> static partial void OnEntity(this SalesDetailDTO dto, SalesDetail entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="SalesDetailDTO"/> converted from <see cref="SalesDetail"/>.</param> static partial void OnDTO(this SalesDetail entity, SalesDetailDTO dto);