Exemple #1
0
            public async Task <IActionResult> Add([FromRoute] Guid universityId, [FromBody] CreateFacultyModel model)
            {
                model.UniversityId = universityId;
                var result = await _facultyService.Add(model);

                return(Created(result.Id.ToString(), null));
            }
Exemple #2
0
 public ActionResult CreateOrUpdate(Faculty faculty)
 {
     if (faculty.FacultyId != 0)
     {
         _facultyService.Update(faculty);
     }
     else
     {
         _facultyService.Add(faculty);
     }
     return(Redirect("/Admin/Departments"));
 }
        public FacultyDTO Post([FromBody] FacultyDTO facDTO)
        {
            FacultyDTO retVal = facultyService.Add(facDTO);

            return(retVal);
        }
        public async Task <IActionResult> Add([FromBody] UpsertFacultyModel model)
        {
            var result = await facultyService.Add(model);

            return(Created(result.Id.ToString(), null));
        }