public async Task UpdateEmployee(Domain.Employees.Employee employee) { var sql = @"UPDATE [dbo].[Employee] SET [FistName] = @FistName ,[LastName] = @LastName ,[Gender] = @Gender ,[CellNumber] = @CellNumber ,[Department] = @Department ,[DateOfJoining] = @DateOfJoining WHERE [Id] = @Id"; await DbConnection.ExecuteAsync(sql, employee, DbTransaction); }
public async Task CreateEmployee(Domain.Employees.Employee employee) { var sql = @"INSERT INTO [Employee] ([Id] ,[FistName] ,[LastName] ,[Gender] ,[CellNumber] ,[Department] ,[DateOfJoining]) VALUES (@Id , @FistName , @LastName , @Gender , @CellNumber , @Department , @DateOfJoining)"; await DbConnection.ExecuteAsync(sql, employee, DbTransaction); }
public async Task <IActionResult> UpdateEmployee(Domain.Employees.Employee employee) { await _updateEmployeeUseCase.UpdateEmployee(employee, _presenter); return(_presenter.Render()); }
public void Delete(Domain.Employees.Employee entity) { throw new NotImplementedException(); }
public async Task <IActionResult> AddEmployee(Domain.Employees.Employee employee) { await _addEmeployeeUseCase.AddEmployee(employee, _presenter); return(_presenter.Render()); }