Пример #1
0
        public async Task <Flat> AddAsync(Flat newEntity)
        {
            _context.Flat.Attach(newEntity); // Do we need this?
            _context.ApplyStateChanges();
            await _context.SaveChangesAsync();

            return(newEntity);
        }
Пример #2
0
        public async Task <Society> AddAsync(Society newEntity)
        {
            _context.Society.Attach(newEntity); // Do we need this?
            _context.ApplyStateChanges();
            await _context.SaveChangesAsync();

            return(newEntity);
        }
Пример #3
0
        public async Task <Building> AddAsync(Building newEntity)
        {
            _context.Building.Attach(newEntity); // Do we need this?
            _context.ApplyStateChanges();
            await _context.SaveChangesAsync();

            return(newEntity);
        }