Exemplo n.º 1
0
 public async Task <OutgoingJsonData> SaveSurveyComponent([FromBody] AssociatedPageSurveyComponents request)
 {
     using (var context = new SurveyContext(Context, Config))
     {
         await Task.Run(() => context.SaveSurveyComponent(request));
     }
     return(new OutgoingJsonData {
         Data = "Success"
     });
 }
 internal async Task SaveSurveyComponent(AssociatedPageSurveyComponents request)
 {
     Context.AssociatedPageSurveyComponents.Add(request);
     await Context.SaveChangesAsync();
 }