public override Content TranslateToModel(CONTENT entity) { try { Content model = null; if (entity != null) { model = new Content(); model.Id = entity.Content_Id; model.Title = entity.Title; model.Description = entity.Description; model.DateUploaded = entity.Date_Uploaded; model.Uploader = _userTranslator.Translate(entity.USER); model.Type = _contentTypeTranslator.Translate(entity.CONTENT_TYPE); model.Cost = entity.Cost; model.Approved = entity.Approved; model.Approver = _userTranslator.Translate(entity.USER1); model.URL = entity.URL; model.Size = entity.Size; } return(model); } catch (Exception) { throw; } }
public override Payment TranslateToModel(PAYMENT entity) { try { Payment model = null; if (entity != null) { model = new Payment(); model.Id = entity.Payment_Id; model.Mode = _paymentModeTranslator.Translate(entity.PAYMENT_MODE); model.Channel = _paymentChannelTranslator.Translate(entity.PAYMENT_CHANNEL); model.User = _userTranslator.Translate(entity.USER); model.SerialNumber = entity.Serial_Number; model.InvoiceNumber = entity.Invoice_Number; model.Paid = entity.Paid; model.DatePaid = entity.Date_Paid; } return(model); } catch (Exception) { throw; } }