示例#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
文件: Service1.cs 项目: tcns/impulse
 public string SaveUserRequest(UserRequest model)
 {
     context.UserRequests.Add(model);
     context.SaveChanges();
     context.Entry<UserRequest>(model).GetDatabaseValues();
     return model.Id.ToString();
 }