public IActionResult DeleteLanguageIdMapping(LanguageIdMapping _languageIdMapping) { try { var domainIdMapping = _CLRCP_MASTERContext.LanguageIdMapping.Where(e => e.LanguageId == _languageIdMapping.LanguageId).FirstOrDefault(); _CLRCP_MASTERContext.LanguageIdMapping.Remove(domainIdMapping); _CLRCP_MASTERContext.SaveChanges(); return(Ok(true)); } catch (Exception) { return(BadRequest(false)); } }
public IActionResult AddLanguageIdMapping(LanguageIdMapping _languageIdMapping) { try { LanguageIdMapping languageIdMapping = new LanguageIdMapping { Value = _languageIdMapping.Value, Description = _languageIdMapping.Description }; _CLRCP_MASTERContext.LanguageIdMapping.Add(languageIdMapping); _CLRCP_MASTERContext.SaveChanges(); return(Ok(true)); } catch (Exception) { return(BadRequest(false)); } }
public IActionResult EditLanguageIdMapping(LanguageIdMapping _languageIdMapping) { try { var languageIdMapping = _CLRCP_MASTERContext.LanguageIdMapping.Where(e => e.LanguageId == _languageIdMapping.LanguageId).FirstOrDefault(); languageIdMapping.Value = _languageIdMapping.Value; languageIdMapping.Description = _languageIdMapping.Description; _CLRCP_MASTERContext.SaveChanges(); return(Ok(true)); } catch (Exception) { return(BadRequest(false)); } }