/// <summary> /// Converts this instance of <see cref="medicationDto"/> to an instance of <see cref="medication"/>. /// </summary> /// <param name="dto"><see cref="medicationDto"/> to convert.</param> public static medication ToEntity(this medicationDto dto) { if (dto == null) { return(null); } var entity = new medication(); entity.v_MedicationId = dto.v_MedicationId; entity.v_ProductId = dto.v_ProductId; entity.v_ServiceId = dto.v_ServiceId; entity.r_Quantity = dto.r_Quantity; entity.v_Doses = dto.v_Doses; entity.i_ViaId = dto.i_ViaId; entity.i_IsDeleted = dto.i_IsDeleted; entity.i_InsertUserId = dto.i_InsertUserId; entity.d_InsertDate = dto.d_InsertDate; entity.i_UpdateUserId = dto.i_UpdateUserId; entity.d_UpdateDate = dto.d_UpdateDate; entity.rowguid = dto.rowguid; entity.r_QuantityVendida = dto.r_QuantityVendida; entity.i_SeVendio = dto.i_SeVendio; entity.i_SeCreoAca = dto.i_SeCreoAca; dto.OnEntity(entity); return(entity); }
/// <summary> /// Converts this instance of <see cref="medicationDto"/> to an instance of <see cref="medication"/>. /// </summary> /// <param name="dto"><see cref="medicationDto"/> to convert.</param> public static medication ToEntity(this medicationDto dto) { if (dto == null) { return(null); } var entity = new medication(); entity.v_MedicationId = dto.v_MedicationId; entity.v_ServiceId = dto.v_ServiceId; entity.v_ProductId = dto.v_ProductId; entity.v_ProductName = dto.v_ProductName; entity.v_PresentationName = dto.v_PresentationName; entity.r_Quantity = dto.r_Quantity; entity.r_QuantityVendida = dto.r_QuantityVendida; entity.v_Doses = dto.v_Doses; entity.i_ViaId = dto.i_ViaId; entity.i_SeVendio = dto.i_SeVendio; entity.i_SeCreoAca = dto.i_SeCreoAca; entity.v_TipoDocVenta = dto.v_TipoDocVenta; entity.v_NroDocVenta = dto.v_NroDocVenta; entity.d_PrecioVenta = dto.d_PrecioVenta; entity.v_MedioPago = dto.v_MedioPago; entity.v_Vendedor = dto.v_Vendedor; entity.i_IsDeleted = dto.i_IsDeleted; entity.i_InsertUserId = dto.i_InsertUserId; entity.d_InsertDate = dto.d_InsertDate; entity.i_UpdateUserId = dto.i_UpdateUserId; entity.d_UpdateDate = dto.d_UpdateDate; dto.OnEntity(entity); return(entity); }