Tenant_Management #114

Merged
ashutosh.nehete merged 73 commits from Tenant_Management into main 2025-08-28 05:13:10 +00:00
Showing only changes of commit d240a79e49 - Show all commits

View File

@ -352,7 +352,6 @@ namespace Marco.Pms.Services.Controllers
return Ok(ApiResponse<object>.SuccessResponse(response, "Tenant profile fetched successfully", 200));
}
// POST api/<TenantController>
[HttpPost("create")]
public async Task<IActionResult> CreateTenant([FromBody] CreateTenantDto model)
@ -551,6 +550,17 @@ namespace Marco.Pms.Services.Controllers
};
_context.Projects.Add(project);
var projectAllocation = new ProjectAllocation
{
ProjectId = project.Id,
EmployeeId = employeeUser.Id,
AllocationDate = model.OnBoardingDate,
IsActive = true,
JobRoleId = adminJobRole.Id,
TenantId = tenant.Id
};
_context.ProjectAllocations.Add(projectAllocation);
// All entities are now added to the context. Save them all in a single database operation.
await _context.SaveChangesAsync();