Example #1
0
        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));
            }
        }
Example #2
0
 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));
     }
 }
Example #3
0
        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));
            }
        }