コード例 #1
0
        public async Task <Department> CreateDepartment(Department department)
        {
            await _sampleAppDbContext.Department.AddAsync(department);

            await _sampleAppDbContext.SaveChangesAsync();

            return(department);
        }
コード例 #2
0
        public async Task <Employee> CreateEmployee(Employee employee)
        {
            await _sampleAppDbContext.Employee.AddAsync(employee);

            await _sampleAppDbContext.SaveChangesAsync();

            return(employee);
        }