コード例 #1
0
        public async void CreateAsync(HighSchoolShortDTO highSchoolDTO)
        {
            if (await _context.Database.EnsureCreatedAsync())
            {
                var highSchool = Mapper.Map <HighSchoolShortDTO, HighSchool>(highSchoolDTO);
                await _context.HighSchools.AddAsync(highSchool);

                await _context.SaveChangesAsync();
            }
        }
コード例 #2
0
 public void Create(HighSchoolShortDTO highSchool)
 {
     _service.CreateAsync(highSchool);
 }