diff --git a/CleanArchitecture.Api/CleanArchitecture.Api.csproj b/CleanArchitecture.Api/CleanArchitecture.Api.csproj
index c9d90c1..5b5b96b 100644
--- a/CleanArchitecture.Api/CleanArchitecture.Api.csproj
+++ b/CleanArchitecture.Api/CleanArchitecture.Api.csproj
@@ -7,27 +7,28 @@
-
-
-
-
-
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
diff --git a/CleanArchitecture.Application/ViewModels/Tenants/TenantViewModel.cs b/CleanArchitecture.Application/ViewModels/Tenants/TenantViewModel.cs
index af6bb43..23341d0 100644
--- a/CleanArchitecture.Application/ViewModels/Tenants/TenantViewModel.cs
+++ b/CleanArchitecture.Application/ViewModels/Tenants/TenantViewModel.cs
@@ -18,7 +18,7 @@ public sealed class TenantViewModel
{
Id = tenant.Id,
Name = tenant.Name,
- Users = tenant.Users.Select(UserViewModel.FromUser)
+ Users = tenant.Users.Select(UserViewModel.FromUser).ToList()
};
}
}
\ No newline at end of file
diff --git a/CleanArchitecture.Application/viewmodels/Users/UserViewModel.cs b/CleanArchitecture.Application/viewmodels/Users/UserViewModel.cs
index 01ed246..f477101 100644
--- a/CleanArchitecture.Application/viewmodels/Users/UserViewModel.cs
+++ b/CleanArchitecture.Application/viewmodels/Users/UserViewModel.cs
@@ -7,6 +7,7 @@ namespace CleanArchitecture.Application.ViewModels.Users;
public sealed class UserViewModel
{
public Guid Id { get; set; }
+ public Guid TenantId { get; set; }
public string Email { get; set; } = string.Empty;
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
@@ -18,6 +19,7 @@ public sealed class UserViewModel
return new UserViewModel
{
Id = user.Id,
+ TenantId = user.TenantId,
Email = user.Email,
FirstName = user.FirstName,
LastName = user.LastName,
diff --git a/Readme.md b/Readme.md
index f73b60d..9909394 100644
--- a/Readme.md
+++ b/Readme.md
@@ -38,6 +38,19 @@ To run the project, follow these steps:
### Using docker
+Requirements
+> This is only needed if running the API locally or only the docker image
+1. Redis: `docker run --name redis -d -p 6379:6379 -e ALLOW_EMPTY_PASSWORD=yes redis:latest`
+2. Add this to the redis configuration in the Program.cs
+```csharp
+options.ConfigurationOptions = new ConfigurationOptions
+ {
+ AbortOnConnectFail = false,
+ EndPoints = { "localhost", "6379" }
+ };
+```
+
+Running the container
1. Build the Dockerfile: `docker build -t clean-architecture .`
2. Run the Container: `docker run -p 80:80 clean-architecture`