Пример #1
0
 public async Task<HttpResponseMessage> SendUserRequest(UserRequest request)
 {
     request.DateTime = DateTime.Now;
     string id = await service.SaveUserRequestAsync(request);
     return Request.CreateResponse(HttpStatusCode.OK, id);
 }
Пример #2
0
 public string SaveUserRequest(UserRequest model)
 {
     context.UserRequests.Add(model);
     context.SaveChanges();
     context.Entry<UserRequest>(model).GetDatabaseValues();
     return model.Id.ToString();
 }