Example #1
0
        public static async Task <T> WithEntityInTheDatabaseAsync <T>(this BaseTest current, T entity)
        {
            await current.ExecuteDbContextAsync(async context =>
            {
                await context.AddAsync(entity);
                await context.SaveChangesAsync();
            });

            return(entity);
        }