Example #1
0
        /// <summary>
        /// Сохранить сущность
        /// </summary>
        /// <param name="entity">Сущность для сохранения</param>
        /// <returns></returns>
        public virtual short Save(T entity)
        {
            CheckUniqueness(entity);

            baseDictionaryRepository.Save(entity);

            return(entity.Id);
        }
Example #2
0
 public static string SaveDictionary(BaseDictionary baseDictionary)
 {
     if (string.IsNullOrEmpty(baseDictionary.Value))
     {
         return(ResponseCode.Base.ValueNullOrEmpty);
     }
     baseDictionaryRepository.Save(baseDictionary);
     return(ResponseCode.Ok);
 }