Ejemplo n.º 1
0
        public async Task <bool> UpdateEventAsync(OrganizedEvent eventToUpdate)
        {
            _dataContext.OrganizedEvents.Update(eventToUpdate);
            var updated = await _dataContext.SaveChangesAsync();

            return(updated > 0);
        }
Ejemplo n.º 2
0
        public async Task <bool> CreateEventAsync(OrganizedEvent organizedEvent)
        {
            await _dataContext.OrganizedEvents.AddAsync(organizedEvent);

            var created = await _dataContext.SaveChangesAsync();

            return(created > 0);
        }