private HttpResponseMessage SendGetChannelsRequest(int channelId, IMessagesData data) { var model = new SearchChannelsBindingModel { ChannelId = channelId }; var controller = new ChannelsController(data); this.SetupController(controller); var response = controller.GetChannelById(model) .ExecuteAsync(CancellationToken.None).Result; return response; }
public ChannelMessagesController(IMessagesData data) : base(data) { }
public ChannelsController(IMessagesData data) { this.db = data; }
public UserMessagesController(IMessagesData data) { this.db = data; }
public AccountController(IMessagesData data) { this.db = data; this.userManager = new ApplicationUserManager(data.UserStore); }
/// <inheritdoc /> public MessageController(IChatsData chatsData, IMessagesData messagesData) { _chatsData = chatsData ?? throw new ArgumentNullException(nameof(chatsData)); _messagesData = messagesData ?? throw new ArgumentNullException(nameof(messagesData)); }
//public BaseApiController() // : this(new MessagesDbContext()) //{ //} //public BaseApiController(MessagesDbContext data) //{ // this.Data = data; //} //protected MessagesDbContext Data { get; set; } public BaseApiController(IMessagesData data) { this.Data = data; }
public ChannelMessagesController(IMessagesData data) { this.db = data; }
public UserController(IMessagesData data) : base(data) { }