public async Task<ActionResult> Edit(StudyFieldDegreeViewModel studyFieldDegreeModel) { _studyFieldDegreeService.Edit(new DomainClasses.StudyFieldDegree { Id = studyFieldDegreeModel.Id, Name = studyFieldDegreeModel.Name }); await _dbContext.SaveChangesAsync(); return new HttpStatusCodeResult(HttpStatusCode.OK); }
public async Task<ActionResult> Add(StudyFieldDegreeViewModel studyFieldDegreeModel) { var studyField = new DomainClasses.StudyFieldDegree { Id = studyFieldDegreeModel.Id, Name = studyFieldDegreeModel.Name }; _studyFieldDegreeService.Add(studyField); await _dbContext.SaveChangesAsync(); return Json(studyField.Id); }