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

            repository.Insert(obj);
            return(obj);
        }
예제 #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;
     }
 }