-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove direct access to db Department table through weektemplate cont…
…roller
- Loading branch information
1 parent
e7e1b6a
commit 72b4bcc
Showing
5 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using GirafEntities.User; | ||
using GirafRepositories.Interfaces; | ||
|
||
namespace GirafServices.User; | ||
|
||
public class DepartmentService : IDepartmentService | ||
{ | ||
private readonly IDepartmentRepository _departmentRepository; | ||
|
||
public DepartmentService(IDepartmentRepository departmentRepository) | ||
{ | ||
_departmentRepository = departmentRepository; | ||
} | ||
|
||
public async Task<Department> GetDepartmentByUser(GirafUser user) | ||
{ | ||
return _departmentRepository.GetDepartmentByUser(user); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using GirafEntities.User; | ||
|
||
namespace GirafServices.User; | ||
|
||
public interface IDepartmentService | ||
{ | ||
Task<Department> GetDepartmentByUser(GirafUser user); | ||
} |