コード例 #1
0
        public async Task <Society> AddAsync(Society newEntity)
        {
            _context.Society.Attach(newEntity); // Do we need this?
            _context.ApplyStateChanges();
            await _context.SaveChangesAsync();

            return(newEntity);
        }
コード例 #2
0
ファイル: FlatRepository.cs プロジェクト: antcorpinc/Apollo
        public async Task <Flat> AddAsync(Flat newEntity)
        {
            _context.Flat.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);
        }
コード例 #4
0
ファイル: UserRepository.cs プロジェクト: antcorpinc/Apollo
 public async Task <bool> SaveAsync()
 {
     return((await _context.SaveChangesAsync()) >= 0);
 }