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);
        }
Exemple #3
0
        public async Task <IActionResult> UpdateEmployee(Domain.Employees.Employee employee)
        {
            await _updateEmployeeUseCase.UpdateEmployee(employee, _presenter);

            return(_presenter.Render());
        }
Exemple #4
0
 public void Delete(Domain.Employees.Employee entity)
 {
     throw new NotImplementedException();
 }
Exemple #5
0
        public async Task <IActionResult> AddEmployee(Domain.Employees.Employee employee)
        {
            await _addEmeployeeUseCase.AddEmployee(employee, _presenter);

            return(_presenter.Render());
        }