public async Task <int> Add(Event @event)
        {
            var request = await _dbContext.Events.AddAsync(@event);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
        public async Task <int> Add(EventParticipants eventParticipants)
        {
            var request = await _dbContext.EventParticipants.AddAsync(eventParticipants);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
예제 #3
0
        public async Task <int> Add(Ong ong)
        {
            var request = await _dbContext.Ongs.AddAsync(ong);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
예제 #4
0
        public async Task <int> Add(Address address)
        {
            var request = await _dbContext.Address.AddAsync(address);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
        public async Task <int> AddPerson(Person person)
        {
            var request = await _dbContext.Person.AddAsync(person);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
예제 #6
0
        public async Task <int> Add(Homeless homeless)
        {
            try
            {
                var request = await _dbContext.Homeless.AddAsync(homeless);

                await _dbContext.SaveChangesAsync();

                return(request.Entity.Id);
            }
            catch (Exception e)
            {
                throw;
            }
        }
예제 #7
0
        public async Task <int> Add(User user)
        {
            var request = await _dbContext.Users.AddAsync(user);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
        public async Task <int> Add(Photo photo)
        {
            var request = await _dbContext.Photos.AddAsync(photo);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
        public async Task <int> Add(Donation donation)
        {
            var request = await _dbContext.Donations.AddAsync(donation);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }
        public async Task <int> Add(Supporter supporter)
        {
            var request = await _dbContext.Supporters.AddAsync(supporter);

            await _dbContext.SaveChangesAsync();

            return(request.Entity.Id);
        }