Пример #1
0
        public async Task <IActionResult> AddEmployee(Model.EmployeeModel employee)
        {
            var result = await this.manager.AddEmployee(employee);

            if (result == 1)
            {
                return(this.Ok(employee));
            }
            else
            {
                Log.Error("This is a Bad Request");
                return(this.BadRequest());
            }
        }
        public async Task <IActionResult> AddEmployee(Model.EmployeeModel employee)
        {
            var result = await this.manager.AddEmployee(employee);

            if (result == 1)
            {
                return(this.Ok(employee));
            }
            else
            {
                return(this.BadRequest());

                Log.Error("BadRequest, Provide Correct Infomation of Employee");
            }
        }