コード例 #1
0
 public HttpResponseMessage Push(MFTFormSubmissionDTO mftForm)
 {
     if (ModelState.IsValid) {
         _service.AddMFTForm(mftForm);
         return Request.CreateResponse(HttpStatusCode.OK, mftForm);
     }
     return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
 }
コード例 #2
0
ファイル: MFTService.cs プロジェクト: GBoh/AngularIndividual
 public void AddMFTForm(MFTFormSubmissionDTO mftForm)
 {
     MFTFormSubmission newForm = Mapper.Map<MFTFormSubmission>(mftForm);
     _repo.Add<MFTFormSubmission>(newForm);
     _repo.SaveChanges();
 }