public bool AddUser(BLL.Model.User value) { var existedUser = GetByUserName(value.Username); if (existedUser != null) { return(false); } Repository.Add(Mapper.Map <User>(value)); return(true); }
public RepositoryBase(ThazDbContext dbContext, BLL.Model.User user) { userId = user?.Id; DbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); }