Esempio n. 1
0
        public T Post <V>(T obj) where V : AbstractValidator <T>
        {
            Validate(obj, Activator.CreateInstance <V>());

            repository.Insert(obj);
            return(obj);
        }
Esempio n. 2
0
 public int Insert(User User)
 {
     try
     {
         using (_UserBaseRepository._context = _DbContext)
         {
             _UserBaseRepository.Insert(User);
             _UserBaseRepository._context.SaveChanges();
             return(User.Id);
         }
     }
     catch (Exception error)
     {
         throw error;
     }
 }