public void AddAdobeSignLog(int?creditDataId, string action, string request, object response) { object agreementStatus = null; if (response != null) { agreementStatus = response.GetPropertyValue("status"); } using (var context = new CreditAppContext()) { AdobeSignLogEntity entity = new AdobeSignLogEntity { CreditDataId = creditDataId, Action = action, Request = request, Response = response.ToJson(), AgreementStatus = agreementStatus?.ToString() }; context.AdobeSignLogs.Add(entity); context.SaveChanges(); } }
public CreditAppRepository() { this._context = new CreditAppContext(); }