public async Task <IActionResult> AddLanguage([FromBody] Language language) { var createLanguage = await _language.AddAsync(language); if (createLanguage) { return(Ok("Language Created")); } else { return(BadRequest(new { message = "Unable to create language details" })); } }
public async Task <IActionResult> Create(Language language) { var createLanguage = await _language.AddAsync(language); if (createLanguage) { Alert("Language created successfully", NotificationType.success); return(RedirectToAction("Index")); } else { Alert("Language not created", NotificationType.error); } return(View()); }