public static R_DeliveryReportMessage ConvertDTOtoEntity(DeliveryReportMessageDTO dto) { R_DeliveryReportMessage deliveryReportMessage = new R_DeliveryReportMessage(); deliveryReportMessage.DeliveryReportMessageId = dto.DeliveryReportMessageId; deliveryReportMessage.DeliveryReportMessageTypeId = dto.DeliveryReportMessageTypeId; deliveryReportMessage.Message = dto.Message; deliveryReportMessage.IsDeleted = dto.IsDeleted; deliveryReportMessage.CreateBy = dto.CreateBy; deliveryReportMessage.CreateOn = dto.CreateOn; deliveryReportMessage.UpdateBy = dto.UpdateBy; deliveryReportMessage.UpdateOn = dto.UpdateOn; return(deliveryReportMessage); }
// logging helper public static string FormatDeliveryReportMessageDTO(DeliveryReportMessageDTO deliveryReportMessageDTO) { if (deliveryReportMessageDTO == null) { // null return("deliveryReportMessageDTO: null"); } else { // output values return("deliveryReportMessageDTO: \n" + "{ \n" + " DeliveryReportMessageId: " + "'" + deliveryReportMessageDTO.DeliveryReportMessageId + "'" + ", \n" + " DeliveryReportMessageTypeId: " + "'" + deliveryReportMessageDTO.DeliveryReportMessageTypeId + "'" + ", \n" + " Message: " + (deliveryReportMessageDTO.Message != null ? "'" + deliveryReportMessageDTO.Message + "'" : "null") + ", \n" + " IsDeleted: " + "'" + deliveryReportMessageDTO.IsDeleted + "'" + ", \n" + " CreateBy: " + (deliveryReportMessageDTO.CreateBy != null ? "'" + deliveryReportMessageDTO.CreateBy + "'" : "null") + ", \n" + " CreateOn: " + (deliveryReportMessageDTO.CreateOn != null ? "'" + deliveryReportMessageDTO.CreateOn + "'" : "null") + ", \n" + " UpdateBy: " + (deliveryReportMessageDTO.UpdateBy != null ? "'" + deliveryReportMessageDTO.UpdateBy + "'" : "null") + ", \n" + " UpdateOn: " + (deliveryReportMessageDTO.UpdateOn != null ? "'" + deliveryReportMessageDTO.UpdateOn + "'" : "null") + " \n" + "} \n"); } }