public async Task <bool> RegisterCompany <TInputModel>(TInputModel inputModel) { var company = AutoMapper.Mapper.Map <Company>(inputModel); this.dbContext.Companies.Add(company); int result = await dbContext.SaveChangesAsync(); return(result > 0); }
public async Task <bool> HireEmployee <TInputModel>(TInputModel inputModel) { var employee = AutoMapper.Mapper.Map <Employee>(inputModel); this.dbContext.Employees.Add(employee); int result = await dbContext.SaveChangesAsync(); return(result > 0); }