Return Employee ID for POST
This commit is contained in:
parent
b7ba8c499c
commit
42295d68df
@ -77,7 +77,8 @@ namespace DamageAssesment.Api.Employees.Providers
|
|||||||
EmployeeDbContext.Employees.Add(_employee);
|
EmployeeDbContext.Employees.Add(_employee);
|
||||||
Employee.Id = _employee.Id;
|
Employee.Id = _employee.Id;
|
||||||
EmployeeDbContext.SaveChanges();
|
EmployeeDbContext.SaveChanges();
|
||||||
return (true, Employee, null);
|
//return (true, Employee, null);
|
||||||
|
return (true, mapper.Map<Db.Employee, Models.Employee>(_employee), null);
|
||||||
}
|
}
|
||||||
return (false, null, "Employee code is already exits");
|
return (false, null, "Employee code is already exits");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user