public UserController() { _usersService = new UsersService(Context, GetPageSize()); }
public bool AskAllFollowers(string content) { var usersService = new UsersService(_context, _pageSize); var followers = usersService.GetFollowers(usersService.GetCurrentUserName()); var currentUser = usersService.GetCurrentUser(); var question = InitializeQuestion(content, currentUser); foreach (var follower in followers) { AddQuestionDetailToContext(currentUser, follower, question); } try { _context.SaveChanges(); return true; } catch (Exception e) { return false; } }
public QuestionsController() { _usersService = new UsersService(Context, GetPageSize()); _questionsService = new QuestionsService(Context, GetPageSize()); }
public ManageController() { _usersService = new UsersService(Context, 0); }