Exemple #1
0
        public async Task <int> AddAsync(Booking booking)
        {
            if (booking == null)
            {
                throw new ArgumentNullException("booking");
            }

            await dbContext.AddAsync(booking);

            return(await dbContext.SaveChangesAsync());
        }
        private static async Task AddInternalAsync(CoreDbContext context, IEntity entity)
        {
            if (entity is IDerivedEntity derived)
            {
                await AddInternalAsync(context, derived._BaseClone);
            }

            await context.AddAsync(entity);
        }