Example #1
0
        }                          // for EF

        public GovLocation(string name, GovlocTypes type, string code = "")
        {
            Name = name;
            Type = type;
            Code = code;

            Guard.Against.NullOrEmpty(name, nameof(name));
            //Guard.Against.NullOrEmpty(code, nameof(code));
        }
Example #2
0
        private static GovLocation AddLocation(string name, GovlocTypes type, GovLocation parent, string recordingsUrl = null)
        {
            GovLocation loc = new GovLocation(name, type, null)
            {
                ParentLocation = parent,
                RecordingsUrl  = recordingsUrl
            };

            _context.GovLocations.Add(loc);
            _context.SaveChanges();
            return(loc);
        }