public async Task AddAsync(JobPositionModel model) { var position = new MasterJobPosition { PositionName = model.PositionName, PositionCode = model.PositionCode }; await _repository.AddAsync(position); }
public void TestInitialize() { _jobPosition = new MasterJobPosition { PositionName = "A", PositionCode = "A" }; var option = new DbContextOptionsBuilder <EmployeeContext>() .UseInMemoryDatabase(databaseName: "TestEmployee") .Options; _context = new EmployeeContext(option); _repository = new Repository <MasterJobPosition>(_context); }