public T Post <V>(T obj) where V : AbstractValidator <T> { Validate(obj, Activator.CreateInstance <V>()); repository.Insert(obj); return(obj); }
public int Insert(User User) { try { using (_UserBaseRepository._context = _DbContext) { _UserBaseRepository.Insert(User); _UserBaseRepository._context.SaveChanges(); return(User.Id); } } catch (Exception error) { throw error; } }