Пример #1
0
 public IEnumerable <Model.LogRow> Get(long importId, string ipAddress, short responseCode, DateTime when, string userAgent, string method, int page, int size)
 {
     //Model.LogRow.ImportId
     //Model.LogRow.IpAddress
     //Model.LogRow.ResponseCode
     //Model.LogRow.Date
     //Model.LogRow.UserAgent
     //Model.LogRow.Method
     Model.ClfContext context = new Model.ClfContext();
     Model.LogRow     logRow  = new Model.LogRow
     {
         ImportId     = importId,
         IpAddress    = ipAddress,
         ResponseCode = responseCode,
         Date         = when,
         UserAgent    = userAgent
     };
     if (!string.IsNullOrEmpty(method))
     {
         logRow.SetMethodByName(method);
     }
     return(new Service.LogRowService(context).Filter(logRow, page, size));
 }
Пример #2
0
 public string GetRowText([FromBody] Model.LogRow data)
 {
     return(data.ToString());
 }
Пример #3
0
 public void Post([FromBody] Model.LogRow entity)
 {
     Model.ClfContext context = new Model.ClfContext();
     new Service.LogRowService(context).InsertOrUpdate(entity);
 }