public void UpdateCreditAppStatus(int creditDataId, string status) { var creditDataEntity = this._context.CreditData.SingleOrDefault(x => x.Id == creditDataId); if (creditDataEntity != null) { creditDataEntity.Status = status; _context.SaveChanges(); } }
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(); } }