public void CreateCallLog(string hashKey, CallLogStatus status) { ConfigCallLog cl = new ConfigCallLog { Key = hashKey, Status = status.ToString(), RequestStartTime = DateTime.UtcNow }; _context.CallLog.Add(cl); _context.SaveChanges(); }
public void UpdateCallLog(ConfigCallLog callLogRow, string hashKey, CallLogStatus status) { if (callLogRow == null) { callLogRow = _context.CallLog .Where(b => b.Key == hashKey) .FirstOrDefault(); } callLogRow.Status = status.ToString(); callLogRow.FinishTime = DateTime.UtcNow; _context.CallLog.Update(callLogRow); _context.SaveChanges(); }