Esempio n. 1
0
        protected Singleton()
        {
            Dictionary <int, Queue <string> > Rooms = new Dictionary <int, Queue <string> >();

            using (var context = new HomeDrawDbContext())
            {
                var drawings = (from p in context.Drawings select p);

                foreach (Drawing drawing in drawings)
                {
                    Queue <string> queue = new Queue <string>();

                    if (drawing.MasterID != null)
                    {
                        queue.Enqueue(drawing.MasterID);
                    }

                    //foreach (AppUser user in drawing.JoinedUsers)
                    //{
                    //    queue.Enqueue(user.Id);
                    //}

                    Rooms.Add(drawing.DrawingID, queue);
                }
            }

            ListOfRooms = Rooms;
        }
Esempio n. 2
0
        public static AppUserManager Create(IdentityFactoryOptions <AppUserManager> options, IOwinContext context)
        {
            HomeDrawDbContext db = context.Get <HomeDrawDbContext>();


            AppUserManager manager = new AppUserManager(new UserStore <AppUser>(db));



            return(manager);
        }