Beispiel #1
0
        private List <AreaType> getActiveAreas(AreaDbContext DB, string username)
        {
            List <AreaType> active_areatypes = new List <AreaType>();
            List <AREA>     active_areas     = DB.areas.ToList();

            foreach (var active_area in active_areas)
            {
                if (active_area.username == username)
                {
                    AreaType active_areatype = AreaType.findAreaTypeById(DB, active_area.type);
                    if (active_areatype != null)
                    {
                        active_areatypes.Add(active_areatype);
                    }
                }
            }
            return(active_areatypes);
        }