public async Task <bool> EditMunicipality(Municipality municipality)
        {
            _context.Set <Municipality>().AddOrUpdate(municipality);
            await _context.SaveChangesAsync();

            return(true);
        }
Beispiel #2
0
        public async Task <bool> EditRegion(Region region)
        {
            _context.Set <Region>().AddOrUpdate(region);
            //_context.Entry(region).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(true);
        }