Пример #1
0
        public List <TypeVm> GetPlaces()
        {
            var places = new List <TypeVm>();

            DataTable dt = EventDb.GetAllPlaces();

            foreach (DataRow row in dt.Rows)
            {
                var type = new TypeVm();

                type.Id   = (int)row["Id"];
                type.Name = (string)row["Name"];

                places.Add(type);
            }

            return(places);
        }