Exemplo n.º 1
0
 public HomeController(ILogger <HomeController> logger, socialnetworkContext context, IHubContext <ChatHub> hubContext, ITrendsFee trends)
 {
     _logger         = logger;
     _context        = context;
     _trends         = trends;
     this.hubContext = hubContext;
 }
Exemplo n.º 2
0
        public List <UsersWithCommon> GetUsersWithCommon(Guid Id, socialnetworkContext context, int skip, int rows, string pattern, string city, string country)
        {
            SqlParameter parameter    = new SqlParameter("@ID", Id);
            SqlParameter skipparam    = new SqlParameter("@skip", skip);
            SqlParameter rowsparam    = new SqlParameter("@rows", rows);
            SqlParameter patternparam = new SqlParameter("@pattern", pattern);
            SqlParameter cityparam    = new SqlParameter("@city", city);
            SqlParameter countryparam = new SqlParameter("@country", country);
            var          Users        = context.users.FromSqlRaw("GetCommonFriends @ID, @skip, @rows, @pattern, @city, @country", new SqlParameter[] { parameter, skipparam, rowsparam, patternparam, cityparam, countryparam }).ToList();

            return(Users);
        }
Exemplo n.º 3
0
 public FriendsController(socialnetworkContext context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public UsersController(socialnetworkContext context, IFriendFee friendsFee)
 {
     _context   = context;
     _friendFee = friendsFee;
 }
Exemplo n.º 5
0
 public ChatHub(socialnetworkContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
        public List <TrendPosts> GetTrends(socialnetworkContext context)
        {
            var Users = context.trends.ToList();

            return(Users);
        }
Exemplo n.º 7
0
 public BlogsController(socialnetworkContext context)
 {
     _context = context;
 }
Exemplo n.º 8
0
 public MessagesController(socialnetworkContext context)
 {
     _context = context;
 }
Exemplo n.º 9
0
 public AuthController(socialnetworkContext context, IHubContext <ChatHub> hubContext)
 {
     _context   = context;
     _tokensalt = Convert.FromBase64String("h/QUm2iYZ8lIttbVGCTnYA==");
     HubContext = hubContext;
 }