コード例 #1
0
        private async Task GivenOneConference(ExploreContext context)
        {
            var conference = new Conference();

            conference.Identity = "awesomecon";
            await context.Conference.AddAsync(conference);

            await context.SaveChangesAsync();
        }
コード例 #2
0
        private async Task <Conference> GivenOneConference(ExploreContext context)
        {
            var conference = new Conference();

            conference.Identity = "awesomecon";
            var entry = await context.Conference.AddAsync(conference);

            await context.SaveChangesAsync();

            return(entry.Entity);
        }
コード例 #3
0
 private async Task GivenOneSpeaker(ExploreContext context, Conference conference)
 {
     conference.AddSpeaker();
     await context.SaveChangesAsync();
 }