示例#1
0
 public bool SaveRequest(UssdRequestMessage _request)
 {
     try
     {
         var request=new Request()
             {
                 TransactionId = _request.TransactionId,
                 MSISDN = _request.MSISDN,
                 TransactionTime = DateTime.Now,
                 USSDRequestString = _request.USSDRequestString,
                 USSDServiceCode = _request.USSDServiceCode,
                 Response = _request.response,
                 ChargingFlag = _request.ChargingFlag,
                 ChargeCode = _request.ChargeCode
             };
         _context.Request.Add(request);
         _context.SaveChanges();
         return true;
     }
     catch
     {
         return false;
     }
 }
示例#2
0
 public bool SaveRequest(Request request)
 {
     try
     {
         _context.Request.Add(request);
         _context.SaveChanges();
         return true;
     }
     catch
     {
         return false;
     }
 }