public async Task <IActionResult> AddEducation(EducationModel model) { model.UserId = User.Identity.GetUserId(); var education = await _educationService.CreateEducationAsync(model); if (education != null) { return(FormResult.CreateSuccessResult("Added education", Url.Action("ByIdEducation", "Education", new { Id = education.Id }))); } else { return(FormResult.CreateErrorResult("An error occurred")); } }