public static UserPosition FindOrAddUserPosition(this AssetHubContext db, string name)
        {
            var position = (from p in db.UserPositions
                            where p.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)
                            select p).FirstOrDefault();

            if (position == null)
            {
                position = new UserPosition {
                    Name = name
                };
                db.UserPositions.Add(position);
                db.SaveChanges();
            }

            return(position);
        }
        public static Room FindOrAddRoom(this AssetHubContext db, string name)
        {
            var room = (from r in db.Rooms
                        where r.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)
                        select r).FirstOrDefault();

            if (room == null)
            {
                room = new Room {
                    Name = name
                };
                db.Rooms.Add(room);
                db.SaveChanges();
            }

            return(room);
        }