ref: project structure
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using mws.backend.dotnet.application.Common;
|
||||
using mws.backend.dotnet.domain.Projects;
|
||||
|
||||
namespace mws.backend.dotnet.application.Projects;
|
||||
|
||||
internal static class ProjectAccess
|
||||
{
|
||||
public static async Task<Project> GetForUserOrThrowAsync(IUnitOfWork uow, Guid userId, Guid projectId, CancellationToken ct)
|
||||
{
|
||||
return await uow.Projects.GetForUserAsync(userId, projectId, ct)
|
||||
?? throw new NotFoundException("Project not found");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user