├── .gitattributes
├── .gitignore
├── Contracts
├── Contracts.csproj
├── IEmployeeRepository.cs
├── ILoggerManager.cs
├── IProjectRepository.cs
├── IRepositoryBase.cs
└── IRepositoryManager.cs
├── Draws.drawio
├── Entities
├── Entities.csproj
├── ErroModel
│ └── ErrorDetails.cs
├── Exceptions
│ ├── ClassDiagram1.cd
│ ├── EmployeeNotFoundException.cs
│ ├── NotFoundException.cs
│ └── ProjectNotFoundException.cs
└── Models
│ ├── Employee.cs
│ └── Project.cs
├── LoggerService
├── LoggerManager.cs
└── LoggerService.csproj
├── ProjectManagement.Presentation
├── AssemblyReference.cs
├── Controllers
│ ├── EmployeesController.cs
│ └── ProjectsController.cs
└── ProjectManagement.Presentation.csproj
├── ProjectManagement
├── Extensions
│ ├── ExceptionMiddlewareExtensions.cs
│ └── ServiceExtensions.cs
├── Migrations
│ ├── 20220422151923_CreateDb.Designer.cs
│ ├── 20220422151923_CreateDb.cs
│ └── RepositoryContextModelSnapshot.cs
├── Program.cs
├── ProjectManagement.csproj
├── Properties
│ └── launchSettings.json
├── Utilities
│ ├── Mapping
│ │ └── MappingProfile.cs
│ └── OutputFormatter.cs
│ │ └── CsvOutputFormatter.cs
├── appsettings.Development.json
├── appsettings.json
├── internal_logs
│ └── internallog.txt
└── nlog.config
├── README.md
├── Repository
├── Config
│ ├── EmployeeConfig.cs
│ └── ProjectConfig.cs
├── EmployeeRepository.cs
├── ProjectRepository.cs
├── Repository.csproj
├── RepositoryBase.cs
├── RepositoryContext.cs
└── RepositoryManager.cs
├── Service.Contracts
├── IEmployeeService.cs
├── IProjectService.cs
├── IServiceManager.cs
└── Service.Contracts.csproj
├── Service
├── EmployeeService.cs
├── ProjectService.cs
├── Service.csproj
└── ServiceManager.cs
├── Shared
├── Class1.cs
├── DataTransferObjects
│ ├── EmployeeDto.cs
│ ├── EmployeeDtoForCreation.cs
│ ├── ProjectDto.cs
│ └── ProjectDtoForCreation.cs
└── Shared.csproj
└── WebApiCourse.sln
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/Contracts/Contracts.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Contracts/IEmployeeRepository.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 |
3 | namespace Contracts
4 | {
5 | public interface IEmployeeRepository
6 | {
7 | IEnumerable GetEmployeesByProjectId(Guid projectId, bool trackChanges);
8 | Employee GetEmployeeByProjectId(Guid projectId, Guid id, bool trackChanges);
9 |
10 | void CreateEmployeeForProject(Guid projectId, Employee employee);
11 | void DeleteEmployee(Employee employee);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Contracts/ILoggerManager.cs:
--------------------------------------------------------------------------------
1 | namespace Contracts
2 | {
3 | public interface ILoggerManager
4 | {
5 | void LogInfo(string message);
6 | void LogWarn(string message);
7 | void LogDebug(string message);
8 | void LogError(string message);
9 | }
10 | }
--------------------------------------------------------------------------------
/Contracts/IProjectRepository.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Contracts
9 | {
10 | public interface IProjectRepository
11 | {
12 | IEnumerable GetAllProjects(bool trackChanges);
13 | Project GetOneProjectById(Guid id, bool trackChanges);
14 |
15 | void CreateProject(Project project);
16 | void DeleteProject(Project project);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Contracts/IRepositoryBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Linq.Expressions;
5 | using System.Text;
6 |
7 | using System.Threading.Tasks;
8 |
9 | namespace Contracts
10 | {
11 | public interface IRepositoryBase where T : class
12 | {
13 | IQueryable FindAll(bool trackChanges);
14 | IQueryable FindByCondition(Expression> expression, bool trackChanges);
15 | void Create(T entity);
16 | void Update(T entity);
17 | void Delete(T entity);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Contracts/IRepositoryManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Contracts
8 | {
9 | public interface IRepositoryManager
10 | {
11 | IProjectRepository Project { get; }
12 | IEmployeeRepository Employee { get; }
13 | void Save();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Draws.drawio:
--------------------------------------------------------------------------------
1 | 5Vlbb5swFP41eVyFbS7Oa7NsrdRKVaNdXh04gDsHR8a57dfPBAMhpF2r0kRsRArms48vn79zOMCITBbbr4ot03sZgRhhJ9qOyOcRxsgJkDkVyK5EPIRLIFE8KiGnAWb8N1SWFl3xCHKLlZCWUmi+bIOhzDIIdQtjSslNu1ksRdQCliyBDjALmeiiP3ik0xKlOGjwG+BJWo2M/HFZs2BVY7uSPGWR3BxAZDoiEyWlLkuL7QREQV6bly/P1NYTU5Dp1xgQ9/u3m+vpo+Y/47tbeYu2u+yTb+emd9WCITLrt5dS6VQmMmNi2qDXSq6yCIpeHXPVtLmTcmlAZMAn0HpnN5OttDRQqhfC1pZjFgM9uxQL5XKlQnhh/pUkmEpAv9AO14QbpYJcgFY7Y6dAMM3X7XkwK5mkbtewagqW2DeQbPtdM7GyI81Ss9aow33DbEHTJuUaZku2J2Bj3KvNYsyFmEgh1d6WxHGMw9DguVbyFxzURP7c9/ya9zUoDduXme8yZQ1IpWbrzi6x15vGOVDVJj1wDN/5IHKDgSsYv1LB5JIKrmPYoFl+B3vW9EFyM3LtDWPkXTmYegFy9/9eyzfIsebLPbZ9HO1IPal3bFI3zIBa8xCuJjLTioU67zXiRAxofDLi+CGFedxPxPFoO+Jg70TECc4ZcchzPPdL73kCOiVtesfe69hF6KPo9QYeatxBpCT4P2EZOZek2e2EimmmueaDDBXHuR9xL537jQcuYjqE3I92NPwvpRO1YC+WTiDUoXFYKq4ygb/KmF70jud0dPwIS5lzLW3vvQnZAxq5p4RM8Zz4PUVjfCzkoCtk7JxVyO7QhUwGIeTu88edTBJQ9inkH9DyxaVcLeGA4xH2hRn2em4KSVF4UPIJQn3PMpbAwqz06kFBbs5GAzKrmpvha4u6CzUkpM881St+J2/x+6OwMLnFAV4e/agsoKSdvwZuV2YUd2WGguCjdNZ9Z7NPrqQQoHpOr87iyRTRFscu8rsc4/EJjvHbfdlcNp9PyrdozUcoMv0D7ZZNb5wwEIZ/DcdIBrdLcux+tVW7vazUqKfKxQN4YxhivAv013ccm2U3qRSlVZVIKQewH8avmZkXRMQXVf/eiKbcoAQdJUz2EV9GCR1XdHZg8CDmARRGSY/YBLbqJ4S4ke6VhDYwjyyitqo5hxnWNWT2jAljsDsPy1HLM9CIAh6AbSb0Q3qtpC09vUzSiX8AVZTjzvEs5FeJMThk0pZCYneC+CriC4No/ajqF6Bd7Y51yW7Y5tvF6sdXxdbfl3UzMHPhxdZPWXJMwUBt/1jatqvNp+xzcdjdtocy/7LbXbdhCTsIvQ/1Eo0ijcbgjrrRhsztMJbTQk+PMC9tpQnENGytwRtYoEZDpMaaIue50voeEloVNU015E7hAMYqatO7gCslpdtk3pXKwrYRmduxI08SM7ivJbhEGM3CM5MA9Pea/EiF4mPbyO6AFVgz0LqgchmqEZz+9o2fdpNtOJt5Vp5YZvSHCE4tjsJTN2gQGvKE5sSPNmcdJTPtqpkj5e1eIl9ywrd750uqFc8yRscpmhV313QelD7KKF2OUqTq1ULUK3ZA+twOSF6GA9ZQNRoHgFf9PbhKn9kN/OW54W83HKX+f4F+77l4NNM/MB1Np5+Xu3snf4B89Qs=
--------------------------------------------------------------------------------
/Entities/Entities.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Entities/ErroModel/ErrorDetails.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Text.Json;
6 | using System.Threading.Tasks;
7 |
8 | namespace Entities.ErroModel
9 | {
10 | public class ErrorDetails
11 | {
12 | public int StatusCode { get; set; }
13 | public string? Message { get; set; }
14 |
15 | public override string ToString()
16 | {
17 | return JsonSerializer.Serialize(this);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Entities/Exceptions/ClassDiagram1.cd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
7 | Exceptions\NotFoundException.cs
8 |
9 |
10 |
11 |
12 |
13 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
14 | Exceptions\EmployeeNotFoundException.cs
15 |
16 |
17 |
18 |
19 |
20 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
21 | Exceptions\ProjectNotFoundException.cs
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Entities/Exceptions/EmployeeNotFoundException.cs:
--------------------------------------------------------------------------------
1 | namespace Entities.Exceptions
2 | {
3 | public sealed class EmployeeNotFoundException : NotFoundException
4 | {
5 | public EmployeeNotFoundException(Guid id)
6 | : base($"The employee with {id} doesn't exists.")
7 | {
8 |
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Entities/Exceptions/NotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Entities.Exceptions
8 | {
9 | public class NotFoundException : Exception
10 | {
11 | protected NotFoundException(string message) : base(message)
12 | {
13 |
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Entities/Exceptions/ProjectNotFoundException.cs:
--------------------------------------------------------------------------------
1 | namespace Entities.Exceptions
2 | {
3 | public sealed class ProjectNotFoundException : NotFoundException
4 | {
5 | public ProjectNotFoundException(Guid projectId)
6 | : base($"The project with {projectId} doesn't exists.")
7 | {
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Entities/Models/Employee.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using System.ComponentModel.DataAnnotations.Schema;
3 |
4 | namespace Entities.Models
5 | {
6 | public class Employee
7 | {
8 | [Column("EmployeeId")]
9 | public Guid Id { get; set; }
10 | [Required(ErrorMessage = "FirstName is required.")]
11 | public string FirstName { get; set; }
12 |
13 | [Required(ErrorMessage = "LastName is required.")]
14 | public string LastName { get; set; }
15 |
16 | public int? Age { get; set; }
17 | public string? Position { get; set; }
18 |
19 | [ForeignKey(nameof(Project))]
20 | public Guid? ProjectId { get; set; } /* FK */
21 | public Project Project { get; set; } /* Navigation property */
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Entities/Models/Project.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.ComponentModel.DataAnnotations.Schema;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Entities.Models
10 | {
11 | public class Project
12 | {
13 | [Column("ProjecId")]
14 | public Guid Id { get; set; }
15 |
16 | [Required(ErrorMessage = "Project name is a required field.")]
17 | [MaxLength(60, ErrorMessage = "Maximumu length of the name is 60 characters.")]
18 | public string Name { get; set; }
19 |
20 | public string? Description { get; set; }
21 |
22 | public string? Field { get; set; }
23 | public string? ImageUrl { get; set; }
24 |
25 | public ICollection? Employees { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/LoggerService/LoggerManager.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using NLog;
3 |
4 | namespace LoggerService
5 | {
6 | public class LoggerManager : ILoggerManager
7 | {
8 | private static ILogger logger = LogManager.GetCurrentClassLogger();
9 | public LoggerManager()
10 | {
11 |
12 | }
13 |
14 | public void LogDebug(string message) => logger.Debug(message);
15 |
16 | public void LogError(string message) => logger.Error(message);
17 |
18 | public void LogInfo(string message) => logger.Info(message);
19 |
20 | public void LogWarn(string message) => logger.Warn(message);
21 |
22 | }
23 | }
--------------------------------------------------------------------------------
/LoggerService/LoggerService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ProjectManagement.Presentation/AssemblyReference.cs:
--------------------------------------------------------------------------------
1 | namespace ProjectManagement.Presentation
2 | {
3 | public class AssemblyReference
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/ProjectManagement.Presentation/Controllers/EmployeesController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using Service.Contracts;
3 | using Shared.DataTransferObjects;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace ProjectManagement.Presentation.Controllers
11 | {
12 | [ApiController]
13 | [Route("api/projects/{projectId}/employees")]
14 | public class EmployeesController : ControllerBase
15 | {
16 | private readonly IServiceManager _service;
17 | public EmployeesController(IServiceManager service)
18 | {
19 | _service = service;
20 | }
21 |
22 | [HttpGet]
23 | public IActionResult GetAllEmployeeByProjectId(Guid projectId)
24 | {
25 | var employeeList = _service
26 | .EmployeeService
27 | .GetAllEmployeesByProjectId(projectId, false);
28 |
29 | return Ok(employeeList);
30 | }
31 |
32 | [HttpGet("{id:guid}", Name ="GetOneEmployeeByProjectIdAndId")]
33 | public IActionResult GetOneEmployeeByProjectId(Guid projectId, Guid id)
34 | {
35 | var employee = _service
36 | .EmployeeService
37 | .GetOneEmployeeByProjectId(projectId, id, false);
38 |
39 | return Ok(employee);
40 | }
41 |
42 | [HttpPost]
43 | public IActionResult CreateOneEmployeeByProjectId(Guid projectId,
44 | [FromBody] EmployeeDtoForCreation employeeDto)
45 | {
46 | EmployeeDto employee = _service
47 | .EmployeeService
48 | .CreateOneEmployeeByProjectId(projectId, employeeDto, true);
49 |
50 | return CreatedAtRoute("GetOneEmployeeByProjectIdAndId",
51 | new { projectId, id = employee.Id },
52 | employee);
53 | }
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/ProjectManagement.Presentation/Controllers/ProjectsController.cs:
--------------------------------------------------------------------------------
1 |
2 | using Entities.Models;
3 | using Microsoft.AspNetCore.Mvc;
4 | using Service.Contracts;
5 | using Shared.DataTransferObjects;
6 |
7 | namespace ProjectManagement.Presentation.Controllers
8 | {
9 | [ApiController]
10 | [Route("api/projects")]
11 | public class ProjectsController : ControllerBase
12 | {
13 | private readonly IServiceManager _service;
14 |
15 | public ProjectsController(IServiceManager service)
16 | {
17 | _service = service;
18 | }
19 |
20 | [HttpGet]
21 | public IActionResult GetAllProjects()
22 | {
23 | var projects = _service.ProjectService.GetAllProjects(false);
24 | return Ok(projects);
25 | }
26 |
27 | [HttpGet("{id:guid}", Name ="ProjectById")]
28 | public IActionResult GetOneProjectById(Guid id)
29 | {
30 | var project = _service.ProjectService.GetOneProjectById(id, false);
31 | return Ok(project);
32 | }
33 |
34 | [HttpPost] // 201 : CREATED
35 | public IActionResult CreateOneProject([FromBody] ProjectDtoForCreation projectDto)
36 | {
37 | var project = _service.ProjectService.CreateOneProject(projectDto);
38 | return CreatedAtRoute("ProjectById", new { id = project.Id }, project);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/ProjectManagement.Presentation/ProjectManagement.Presentation.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ProjectManagement/Extensions/ExceptionMiddlewareExtensions.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using Entities.ErroModel;
3 | using Entities.Exceptions;
4 | using Microsoft.AspNetCore.Diagnostics;
5 | using System.Net;
6 |
7 | namespace ProjectManagement.Extensions
8 | {
9 | public static class ExceptionMiddlewareExtensions
10 | {
11 | public static void ConfigureExceptionHandler(this WebApplication app,
12 | ILoggerManager logger)
13 | {
14 | app.UseExceptionHandler(appError =>
15 | {
16 | appError.Run(async context =>
17 | {
18 | context.Response.ContentType = "application/json";
19 |
20 | var contextFeature = context.Features.Get();
21 | if (contextFeature != null)
22 | {
23 | context.Response.StatusCode = contextFeature.Error switch
24 | {
25 | NotFoundException => StatusCodes.Status404NotFound,
26 | _ => StatusCodes.Status500InternalServerError
27 | };
28 |
29 | logger.LogError("There is a problem : " + contextFeature.Error);
30 |
31 | await context.Response.WriteAsync(new ErrorDetails
32 | {
33 | StatusCode = context.Response.StatusCode,
34 | Message = contextFeature.Error.Message
35 | }.ToString());
36 | }
37 | });
38 | });
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/ProjectManagement/Extensions/ServiceExtensions.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using LoggerService;
3 | using Microsoft.EntityFrameworkCore;
4 | using ProjectManagement.Utilities.OutputFormatter.cs;
5 | using Repository;
6 | using Service;
7 | using Service.Contracts;
8 |
9 | namespace ProjectManagement.Extensions
10 | {
11 | public static class ServiceExtensions
12 | {
13 | public static void ConfigureCors(this IServiceCollection services)
14 | {
15 | services.AddCors(options =>
16 | {
17 | options.AddPolicy("CorsPolicy", builder =>
18 | builder.AllowAnyOrigin()
19 | .AllowAnyMethod()
20 | .AllowAnyHeader()
21 | );
22 | });
23 | }
24 |
25 | public static void ConfigureLoggerManager(this IServiceCollection services)
26 | {
27 | services.AddSingleton();
28 | }
29 |
30 | public static void ConfigureSqlContext(this IServiceCollection services,
31 | IConfiguration configuration)
32 | {
33 | services.AddDbContext(options =>
34 | options.UseSqlServer(configuration.GetConnectionString("sqlConnection"),
35 | project => project.MigrationsAssembly("ProjectManagement"))
36 | );
37 | }
38 |
39 | public static void ConfigureRepositoryManager(this IServiceCollection services) =>
40 | services.AddScoped();
41 |
42 | public static void ConfigureServiceManager(this IServiceCollection services) =>
43 | services.AddScoped();
44 |
45 | public static IMvcBuilder AddCustomCSVFormatter(this IMvcBuilder builder) =>
46 | builder.AddMvcOptions(config => config.OutputFormatters.Add(new CsvOutputFormatter()));
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ProjectManagement/Migrations/20220422151923_CreateDb.Designer.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using Microsoft.EntityFrameworkCore;
4 | using Microsoft.EntityFrameworkCore.Infrastructure;
5 | using Microsoft.EntityFrameworkCore.Metadata;
6 | using Microsoft.EntityFrameworkCore.Migrations;
7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8 | using Repository;
9 |
10 | #nullable disable
11 |
12 | namespace ProjectManagement.Migrations
13 | {
14 | [DbContext(typeof(RepositoryContext))]
15 | [Migration("20220422151923_CreateDb")]
16 | partial class CreateDb
17 | {
18 | protected override void BuildTargetModel(ModelBuilder modelBuilder)
19 | {
20 | #pragma warning disable 612, 618
21 | modelBuilder
22 | .HasAnnotation("ProductVersion", "6.0.0")
23 | .HasAnnotation("Relational:MaxIdentifierLength", 128);
24 |
25 | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
26 |
27 | modelBuilder.Entity("Entities.Models.Employee", b =>
28 | {
29 | b.Property("Id")
30 | .ValueGeneratedOnAdd()
31 | .HasColumnType("uniqueidentifier")
32 | .HasColumnName("EmployeeId");
33 |
34 | b.Property("Age")
35 | .HasColumnType("int");
36 |
37 | b.Property("FirstName")
38 | .IsRequired()
39 | .HasColumnType("nvarchar(max)");
40 |
41 | b.Property("LastName")
42 | .IsRequired()
43 | .HasColumnType("nvarchar(max)");
44 |
45 | b.Property("Position")
46 | .HasColumnType("nvarchar(max)");
47 |
48 | b.Property("ProjectId")
49 | .IsRequired()
50 | .HasColumnType("uniqueidentifier");
51 |
52 | b.HasKey("Id");
53 |
54 | b.HasIndex("ProjectId");
55 |
56 | b.ToTable("Employees");
57 |
58 | b.HasData(
59 | new
60 | {
61 | Id = new Guid("bc1ae16a-3572-40de-bd02-dab970697d20"),
62 | Age = 30,
63 | FirstName = "Ahmet",
64 | LastName = "Yıldırım",
65 | Position = "Senior Developer",
66 | ProjectId = new Guid("b67e3d43-23ef-444f-a022-5294810a5428")
67 | });
68 | });
69 |
70 | modelBuilder.Entity("Entities.Models.Project", b =>
71 | {
72 | b.Property("Id")
73 | .ValueGeneratedOnAdd()
74 | .HasColumnType("uniqueidentifier")
75 | .HasColumnName("ProjecId");
76 |
77 | b.Property("Description")
78 | .HasColumnType("nvarchar(max)");
79 |
80 | b.Property("Field")
81 | .HasColumnType("nvarchar(max)");
82 |
83 | b.Property("ImageUrl")
84 | .HasColumnType("nvarchar(max)");
85 |
86 | b.Property("Name")
87 | .IsRequired()
88 | .HasMaxLength(60)
89 | .HasColumnType("nvarchar(60)");
90 |
91 | b.HasKey("Id");
92 |
93 | b.ToTable("Projects");
94 |
95 | b.HasData(
96 | new
97 | {
98 | Id = new Guid("b67e3d43-23ef-444f-a022-5294810a5428"),
99 | Description = "Web Application Programming Interface",
100 | Field = "Computer Science",
101 | Name = "ASP.NET Core Web API Project"
102 | });
103 | });
104 |
105 | modelBuilder.Entity("Entities.Models.Employee", b =>
106 | {
107 | b.HasOne("Entities.Models.Project", "Project")
108 | .WithMany("Employees")
109 | .HasForeignKey("ProjectId")
110 | .OnDelete(DeleteBehavior.Cascade)
111 | .IsRequired();
112 |
113 | b.Navigation("Project");
114 | });
115 |
116 | modelBuilder.Entity("Entities.Models.Project", b =>
117 | {
118 | b.Navigation("Employees");
119 | });
120 | #pragma warning restore 612, 618
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/ProjectManagement/Migrations/20220422151923_CreateDb.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.EntityFrameworkCore.Migrations;
3 |
4 | #nullable disable
5 |
6 | namespace ProjectManagement.Migrations
7 | {
8 | public partial class CreateDb : Migration
9 | {
10 | protected override void Up(MigrationBuilder migrationBuilder)
11 | {
12 | migrationBuilder.CreateTable(
13 | name: "Projects",
14 | columns: table => new
15 | {
16 | ProjecId = table.Column(type: "uniqueidentifier", nullable: false),
17 | Name = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false),
18 | Description = table.Column(type: "nvarchar(max)", nullable: true),
19 | Field = table.Column(type: "nvarchar(max)", nullable: true),
20 | ImageUrl = table.Column(type: "nvarchar(max)", nullable: true)
21 | },
22 | constraints: table =>
23 | {
24 | table.PrimaryKey("PK_Projects", x => x.ProjecId);
25 | });
26 |
27 | migrationBuilder.CreateTable(
28 | name: "Employees",
29 | columns: table => new
30 | {
31 | EmployeeId = table.Column(type: "uniqueidentifier", nullable: false),
32 | FirstName = table.Column(type: "nvarchar(max)", nullable: false),
33 | LastName = table.Column(type: "nvarchar(max)", nullable: false),
34 | Age = table.Column(type: "int", nullable: true),
35 | Position = table.Column(type: "nvarchar(max)", nullable: true),
36 | ProjectId = table.Column(type: "uniqueidentifier", nullable: false)
37 | },
38 | constraints: table =>
39 | {
40 | table.PrimaryKey("PK_Employees", x => x.EmployeeId);
41 | table.ForeignKey(
42 | name: "FK_Employees_Projects_ProjectId",
43 | column: x => x.ProjectId,
44 | principalTable: "Projects",
45 | principalColumn: "ProjecId",
46 | onDelete: ReferentialAction.Cascade);
47 | });
48 |
49 | migrationBuilder.InsertData(
50 | table: "Projects",
51 | columns: new[] { "ProjecId", "Description", "Field", "ImageUrl", "Name" },
52 | values: new object[] { new Guid("b67e3d43-23ef-444f-a022-5294810a5428"), "Web Application Programming Interface", "Computer Science", null, "ASP.NET Core Web API Project" });
53 |
54 | migrationBuilder.InsertData(
55 | table: "Employees",
56 | columns: new[] { "EmployeeId", "Age", "FirstName", "LastName", "Position", "ProjectId" },
57 | values: new object[] { new Guid("bc1ae16a-3572-40de-bd02-dab970697d20"), 30, "Ahmet", "Yıldırım", "Senior Developer", new Guid("b67e3d43-23ef-444f-a022-5294810a5428") });
58 |
59 | migrationBuilder.CreateIndex(
60 | name: "IX_Employees_ProjectId",
61 | table: "Employees",
62 | column: "ProjectId");
63 | }
64 |
65 | protected override void Down(MigrationBuilder migrationBuilder)
66 | {
67 | migrationBuilder.DropTable(
68 | name: "Employees");
69 |
70 | migrationBuilder.DropTable(
71 | name: "Projects");
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/ProjectManagement/Migrations/RepositoryContextModelSnapshot.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using Microsoft.EntityFrameworkCore;
4 | using Microsoft.EntityFrameworkCore.Infrastructure;
5 | using Microsoft.EntityFrameworkCore.Metadata;
6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7 | using Repository;
8 |
9 | #nullable disable
10 |
11 | namespace ProjectManagement.Migrations
12 | {
13 | [DbContext(typeof(RepositoryContext))]
14 | partial class RepositoryContextModelSnapshot : ModelSnapshot
15 | {
16 | protected override void BuildModel(ModelBuilder modelBuilder)
17 | {
18 | #pragma warning disable 612, 618
19 | modelBuilder
20 | .HasAnnotation("ProductVersion", "6.0.0")
21 | .HasAnnotation("Relational:MaxIdentifierLength", 128);
22 |
23 | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
24 |
25 | modelBuilder.Entity("Entities.Models.Employee", b =>
26 | {
27 | b.Property("Id")
28 | .ValueGeneratedOnAdd()
29 | .HasColumnType("uniqueidentifier")
30 | .HasColumnName("EmployeeId");
31 |
32 | b.Property("Age")
33 | .HasColumnType("int");
34 |
35 | b.Property("FirstName")
36 | .IsRequired()
37 | .HasColumnType("nvarchar(max)");
38 |
39 | b.Property("LastName")
40 | .IsRequired()
41 | .HasColumnType("nvarchar(max)");
42 |
43 | b.Property("Position")
44 | .HasColumnType("nvarchar(max)");
45 |
46 | b.Property("ProjectId")
47 | .IsRequired()
48 | .HasColumnType("uniqueidentifier");
49 |
50 | b.HasKey("Id");
51 |
52 | b.HasIndex("ProjectId");
53 |
54 | b.ToTable("Employees");
55 |
56 | b.HasData(
57 | new
58 | {
59 | Id = new Guid("bc1ae16a-3572-40de-bd02-dab970697d20"),
60 | Age = 30,
61 | FirstName = "Ahmet",
62 | LastName = "Yıldırım",
63 | Position = "Senior Developer",
64 | ProjectId = new Guid("b67e3d43-23ef-444f-a022-5294810a5428")
65 | });
66 | });
67 |
68 | modelBuilder.Entity("Entities.Models.Project", b =>
69 | {
70 | b.Property("Id")
71 | .ValueGeneratedOnAdd()
72 | .HasColumnType("uniqueidentifier")
73 | .HasColumnName("ProjecId");
74 |
75 | b.Property("Description")
76 | .HasColumnType("nvarchar(max)");
77 |
78 | b.Property("Field")
79 | .HasColumnType("nvarchar(max)");
80 |
81 | b.Property("ImageUrl")
82 | .HasColumnType("nvarchar(max)");
83 |
84 | b.Property("Name")
85 | .IsRequired()
86 | .HasMaxLength(60)
87 | .HasColumnType("nvarchar(60)");
88 |
89 | b.HasKey("Id");
90 |
91 | b.ToTable("Projects");
92 |
93 | b.HasData(
94 | new
95 | {
96 | Id = new Guid("b67e3d43-23ef-444f-a022-5294810a5428"),
97 | Description = "Web Application Programming Interface",
98 | Field = "Computer Science",
99 | Name = "ASP.NET Core Web API Project"
100 | });
101 | });
102 |
103 | modelBuilder.Entity("Entities.Models.Employee", b =>
104 | {
105 | b.HasOne("Entities.Models.Project", "Project")
106 | .WithMany("Employees")
107 | .HasForeignKey("ProjectId")
108 | .OnDelete(DeleteBehavior.Cascade)
109 | .IsRequired();
110 |
111 | b.Navigation("Project");
112 | });
113 |
114 | modelBuilder.Entity("Entities.Models.Project", b =>
115 | {
116 | b.Navigation("Employees");
117 | });
118 | #pragma warning restore 612, 618
119 | }
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/ProjectManagement/Program.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using LoggerService;
3 | using NLog;
4 | using ProjectManagement.Extensions;
5 |
6 | var builder = WebApplication.CreateBuilder(args);
7 |
8 | LogManager.LoadConfiguration(String.Concat(Directory.GetCurrentDirectory(), "/nlog.config"));
9 |
10 | // Add services to the container.
11 |
12 |
13 | builder.Services.AddEndpointsApiExplorer();
14 | builder.Services.AddSwaggerGen();
15 | builder.Services.ConfigureCors();
16 | builder.Services.ConfigureLoggerManager();
17 | builder.Services.ConfigureSqlContext(builder.Configuration);
18 | builder.Services.ConfigureRepositoryManager();
19 | builder.Services.ConfigureServiceManager();
20 |
21 | builder.Services.AddAutoMapper(typeof(Program));
22 |
23 | builder.Services.AddControllers(config =>
24 | {
25 | config.RespectBrowserAcceptHeader = true;
26 | config.ReturnHttpNotAcceptable = true; // 406
27 | })
28 | .AddXmlDataContractSerializerFormatters()
29 | .AddCustomCSVFormatter()
30 | .AddApplicationPart(typeof(ProjectManagement.Presentation
31 | .AssemblyReference).Assembly);
32 |
33 |
34 | var app = builder.Build();
35 |
36 | var logger = app.Services.GetRequiredService();
37 | app.ConfigureExceptionHandler(logger);
38 |
39 | if (app.Environment.IsProduction())
40 | app.UseHsts();
41 |
42 | // Configure the HTTP request pipeline.
43 | if (app.Environment.IsDevelopment())
44 | {
45 | app.UseSwagger();
46 | app.UseSwaggerUI();
47 | }
48 |
49 | app.UseHttpsRedirection();
50 |
51 | app.UseAuthorization();
52 |
53 | app.MapControllers();
54 |
55 | app.UseCors("CorsPolicy");
56 |
57 | app.Run();
58 |
--------------------------------------------------------------------------------
/ProjectManagement/ProjectManagement.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 | all
12 | runtime; build; native; contentfiles; analyzers; buildtransitive
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/ProjectManagement/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:45909",
8 | "sslPort": 44368
9 | }
10 | },
11 | "profiles": {
12 | "ProjectManagement": {
13 | "commandName": "Project",
14 | "dotnetRunMessages": true,
15 | "launchBrowser": true,
16 | "launchUrl": "swagger",
17 | "applicationUrl": "https://localhost:7208;http://localhost:5208",
18 | "environmentVariables": {
19 | "ASPNETCORE_ENVIRONMENT": "Development"
20 | }
21 | },
22 | "IIS Express": {
23 | "commandName": "IISExpress",
24 | "launchBrowser": true,
25 | "launchUrl": "swagger",
26 | "environmentVariables": {
27 | "ASPNETCORE_ENVIRONMENT": "Development"
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/ProjectManagement/Utilities/Mapping/MappingProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 | using Entities.Models;
3 | using Shared.DataTransferObjects;
4 |
5 | namespace ProjectManagement.Utilities.Mapping
6 | {
7 | public class MappingProfile : Profile
8 | {
9 | public MappingProfile()
10 | {
11 | CreateMap().ReverseMap();
12 | CreateMap();
13 |
14 | CreateMap().ReverseMap();
15 | CreateMap();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ProjectManagement/Utilities/OutputFormatter.cs/CsvOutputFormatter.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc.Formatters;
2 | using Microsoft.Net.Http.Headers;
3 | using Shared.DataTransferObjects;
4 |
5 | using System.Text;
6 |
7 | namespace ProjectManagement.Utilities.OutputFormatter.cs
8 | {
9 | public class CsvOutputFormatter : TextOutputFormatter
10 | {
11 | public CsvOutputFormatter()
12 | {
13 | SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/csv"));
14 | SupportedEncodings.Add(Encoding.UTF8);
15 | SupportedEncodings.Add(Encoding.Unicode);
16 | }
17 |
18 | protected override bool CanWriteType(Type? type)
19 | {
20 | if (typeof(ProjectDto).IsAssignableFrom(type)
21 | || typeof(IEnumerable).IsAssignableFrom(type))
22 | {
23 | return base.CanWriteType(type);
24 | }
25 |
26 | return false;
27 | }
28 |
29 | public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context,
30 | Encoding selectedEncoding)
31 | {
32 | var response = context.HttpContext.Response;
33 | var buffer = new StringBuilder();
34 |
35 | if (context.Object is IEnumerable)
36 | {
37 | foreach (var project in (IEnumerable)context.Object)
38 | {
39 | FormatCsv(buffer, project);
40 | }
41 | }
42 | else
43 | {
44 | FormatCsv(buffer, (ProjectDto)context.Object);
45 | }
46 |
47 | await response.WriteAsync(buffer.ToString());
48 | }
49 |
50 | private static void FormatCsv(StringBuilder buffer, ProjectDto project)
51 | {
52 | buffer.AppendLine($"{project.Id},\"{project.Name},\"{project.Description}\"");
53 | }
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/ProjectManagement/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/ProjectManagement/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "ConnectionStrings": {
9 | "sqlConnection": "Data Source=(localdb)\\MSSQLLocalDB; Initial Catalog=WebApiCourseDb; Integrated Security=true;"
10 | },
11 | "AllowedHosts": "*"
12 | }
13 |
--------------------------------------------------------------------------------
/ProjectManagement/nlog.config:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ASP.NET Core Web API
2 | ASP.NET Core Web Api Course (Ücretsiz Youtube Eğitimi)
3 |
4 | ASP.NET Core Web API eğitiminde amacımız ASP.NET Core kullanarak Web API geliştirmektir. Bu çerçevede Web API yapısı geliştirilirken yazılım mimarisi (onion achitecture), loglama servisi (NLog), proje konfigürasyonu, http istekleri, global hata yönetimi, içerik pazarlığı (content negotiation), asenkron kodlama (asynchronous) ve Action filters gibi teknik konularda pek çok kazanımın elde edilmesini hedefliyoruz.
5 |
6 | [Youtube Oynama Listesi](https://www.youtube.com/watch?v=dFVzggQcNhQ&list=PLK37qYAhi0Ee-0cp0Nqpo9SWMse-lY1sF)
7 |
8 | # İçerik
9 | 
10 |
--------------------------------------------------------------------------------
/Repository/Config/EmployeeConfig.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 | using Microsoft.EntityFrameworkCore;
3 | using Microsoft.EntityFrameworkCore.Metadata.Builders;
4 |
5 | namespace Repository.Config
6 | {
7 | public class EmployeeConfig : IEntityTypeConfiguration
8 | {
9 | public void Configure(EntityTypeBuilder builder)
10 | {
11 | builder.HasData(
12 | new Employee()
13 | {
14 | Id = new Guid("bc1ae16a-3572-40de-bd02-dab970697d20"),
15 | ProjectId = new Guid("b67e3d43-23ef-444f-a022-5294810a5428"),
16 | FirstName = "Ahmet",
17 | LastName = "Yıldırım",
18 | Age = 30,
19 | Position = "Senior Developer"
20 | }
21 | );
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Repository/Config/ProjectConfig.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 | using Microsoft.EntityFrameworkCore;
3 | using Microsoft.EntityFrameworkCore.Metadata.Builders;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace Repository.Config
11 | {
12 | public class ProjectConfig : IEntityTypeConfiguration
13 | {
14 | public void Configure(EntityTypeBuilder builder)
15 | {
16 | builder.HasData(
17 | new Project
18 | {
19 | Id = new Guid("b67e3d43-23ef-444f-a022-5294810a5428"),
20 | Name = "ASP.NET Core Web API Project",
21 | Description = "Web Application Programming Interface",
22 | Field = "Computer Science"
23 | });
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Repository/EmployeeRepository.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using Entities.Models;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Repository
10 | {
11 | public class EmployeeRepository : RepositoryBase, IEmployeeRepository
12 | {
13 | public EmployeeRepository(RepositoryContext repositoryContext) : base(repositoryContext)
14 | {
15 | }
16 |
17 | public void CreateEmployeeForProject(Guid projectId, Employee employee)
18 | {
19 | employee.ProjectId = projectId;
20 | Create(employee);
21 | }
22 |
23 | public void DeleteEmployee(Employee employee)
24 | {
25 | Delete(employee);
26 | }
27 |
28 | public Employee GetEmployeeByProjectId(Guid projectId, Guid id, bool trackChanges) =>
29 | FindByCondition(e => e.ProjectId.Equals(projectId) && e.Id.Equals(id), trackChanges)
30 | .SingleOrDefault();
31 |
32 |
33 | public IEnumerable GetEmployeesByProjectId(Guid projectId, bool trackChanges) =>
34 | FindByCondition(e => e.ProjectId.Equals(projectId), trackChanges)
35 | .OrderBy(e => e.FirstName)
36 | .ToList();
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Repository/ProjectRepository.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using Entities.Models;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Repository
10 | {
11 | public class ProjectRepository : RepositoryBase, IProjectRepository
12 | {
13 | public ProjectRepository(RepositoryContext repositoryContext) : base(repositoryContext)
14 | {
15 | }
16 |
17 | public void CreateProject(Project project) => Create(project);
18 |
19 |
20 | public void DeleteProject(Project project) => Delete(project);
21 |
22 |
23 | public IEnumerable GetAllProjects(bool trackChanges) =>
24 | FindAll(trackChanges)
25 | .OrderBy(p => p.Name)
26 | .ToList();
27 |
28 |
29 | public Project GetOneProjectById(Guid id, bool trackChanges) =>
30 | FindByCondition(p => p.Id.Equals(id), trackChanges)
31 | .SingleOrDefault();
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Repository/Repository.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 | all
14 | runtime; build; native; contentfiles; analyzers; buildtransitive
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Repository/RepositoryBase.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using Microsoft.EntityFrameworkCore;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Linq.Expressions;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace Repository
11 | {
12 | public abstract class RepositoryBase : IRepositoryBase where T : class
13 | {
14 | protected RepositoryContext _repositoryContext;
15 |
16 | protected RepositoryBase(RepositoryContext repositoryContext)
17 | {
18 | _repositoryContext = repositoryContext;
19 | }
20 |
21 | public void Create(T entity) => _repositoryContext.Set().Add(entity);
22 | public void Delete(T entity) => _repositoryContext.Set().Remove(entity);
23 |
24 | public IQueryable FindAll(bool trackChanges) =>
25 | !trackChanges ?
26 | _repositoryContext.Set().AsNoTracking() :
27 | _repositoryContext.Set();
28 |
29 |
30 | public IQueryable FindByCondition(Expression> expression, bool trackChanges) =>
31 | !trackChanges ?
32 | _repositoryContext.Set().Where(expression).AsNoTracking() :
33 | _repositoryContext.Set();
34 |
35 |
36 | public void Update(T entity) => _repositoryContext.Set().Update(entity);
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Repository/RepositoryContext.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 | using Microsoft.EntityFrameworkCore;
3 | using System.Reflection;
4 |
5 | namespace Repository
6 | {
7 | public class RepositoryContext : DbContext
8 | {
9 | public RepositoryContext(DbContextOptions options) : base(options)
10 | {
11 |
12 | }
13 |
14 | protected override void OnModelCreating(ModelBuilder modelBuilder)
15 | {
16 | base.OnModelCreating(modelBuilder);
17 | modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
18 | }
19 |
20 | public DbSet Projects { get; set; }
21 | public DbSet Employees { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/Repository/RepositoryManager.cs:
--------------------------------------------------------------------------------
1 | using Contracts;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Repository
9 | {
10 | public class RepositoryManager : IRepositoryManager
11 | {
12 | private readonly RepositoryContext _context;
13 | private Lazy _projectRepository;
14 | private Lazy _employeeRepository;
15 |
16 | public RepositoryManager(RepositoryContext context)
17 | {
18 | _context = context;
19 |
20 | _projectRepository =
21 | new Lazy(() => new ProjectRepository(_context));
22 |
23 | _employeeRepository =
24 | new Lazy(() => new EmployeeRepository(_context));
25 | }
26 |
27 | public IProjectRepository Project => _projectRepository.Value;
28 | public IEmployeeRepository Employee => _employeeRepository.Value;
29 |
30 | public void Save()
31 | {
32 | _context.SaveChanges();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Service.Contracts/IEmployeeService.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 | using Shared.DataTransferObjects;
3 |
4 | namespace Service.Contracts
5 | {
6 | public interface IEmployeeService
7 | {
8 | IEnumerable GetAllEmployeesByProjectId(Guid projectId, bool trackChanges);
9 | EmployeeDto GetOneEmployeeByProjectId(Guid projectId, Guid employeeId, bool trackChanges);
10 | EmployeeDto CreateOneEmployeeByProjectId(Guid projectId, EmployeeDtoForCreation employeeDto, bool trackChanges);
11 | }
12 | }
--------------------------------------------------------------------------------
/Service.Contracts/IProjectService.cs:
--------------------------------------------------------------------------------
1 | using Entities.Models;
2 | using Shared.DataTransferObjects;
3 |
4 | namespace Service.Contracts
5 | {
6 | public interface IProjectService
7 | {
8 | IEnumerable GetAllProjects(bool trackChanges);
9 | ProjectDto GetOneProjectById(Guid id, bool trackChanges);
10 | ProjectDto CreateOneProject(ProjectDtoForCreation projectDto);
11 | }
12 | }
--------------------------------------------------------------------------------
/Service.Contracts/IServiceManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Service.Contracts
8 | {
9 | public interface IServiceManager
10 | {
11 | IProjectService ProjectService { get; }
12 | IEmployeeService EmployeeService { get; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Service.Contracts/Service.Contracts.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Service/EmployeeService.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 | using Contracts;
3 | using Entities.Exceptions;
4 | using Entities.Models;
5 | using Service.Contracts;
6 | using Shared.DataTransferObjects;
7 |
8 | namespace Service
9 | {
10 | public class EmployeeService : IEmployeeService
11 | {
12 | private readonly IRepositoryManager _repository;
13 | private readonly ILoggerManager _logger;
14 | private readonly IMapper _mapper;
15 |
16 | public EmployeeService(IRepositoryManager repository,
17 | ILoggerManager logger,
18 | IMapper mapper)
19 | {
20 | _repository = repository;
21 | _logger = logger;
22 | _mapper = mapper;
23 | }
24 |
25 | public EmployeeDto CreateOneEmployeeByProjectId(Guid projectId,
26 | EmployeeDtoForCreation employeeDto,
27 | bool trackChanges)
28 | {
29 | // Project exists? | ProjectService (!)
30 | var project = _repository.Project.GetOneProjectById(projectId, false);
31 | if(project is null)
32 | throw new ProjectNotFoundException(projectId);
33 |
34 | // Dto -> Entity
35 | var entity = _mapper.Map(employeeDto);
36 | entity.ProjectId = projectId;
37 |
38 | // Save (EF)
39 | _repository.Employee.CreateEmployeeForProject(projectId,entity);
40 | _repository.Save();
41 |
42 | return _mapper.Map(entity);
43 | }
44 |
45 | public IEnumerable GetAllEmployeesByProjectId(Guid projectId, bool trackChanges)
46 | {
47 | CheckProjectExists(projectId);
48 |
49 | var employeeList = _repository.Employee
50 | .GetEmployeesByProjectId(projectId, trackChanges);
51 |
52 | var employeeDtos = _mapper.Map>(employeeList);
53 | return employeeDtos;
54 | }
55 |
56 | public EmployeeDto GetOneEmployeeByProjectId(Guid projectId, Guid employeeId, bool trackChanges)
57 | {
58 | CheckProjectExists(projectId);
59 |
60 | var employee = _repository.Employee.GetEmployeeByProjectId(projectId, employeeId, trackChanges);
61 |
62 | if (employee is null)
63 | throw new EmployeeNotFoundException(employeeId);
64 |
65 | var employeeDto = _mapper.Map(employee);
66 |
67 | return employeeDto;
68 | }
69 |
70 | private void CheckProjectExists(Guid projectId)
71 | {
72 | var project = _repository.Project.GetOneProjectById(projectId, trackChanges: false);
73 | if (project is null)
74 | throw new ProjectNotFoundException(projectId);
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/Service/ProjectService.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 | using Contracts;
3 | using Entities.Exceptions;
4 | using Entities.Models;
5 | using Service.Contracts;
6 | using Shared.DataTransferObjects;
7 |
8 | namespace Service
9 | {
10 | public class ProjectService : IProjectService
11 | {
12 | private readonly IRepositoryManager _repository;
13 | private readonly ILoggerManager _logger;
14 | private readonly IMapper _mapper;
15 |
16 | public ProjectService(IRepositoryManager repository,
17 | ILoggerManager logger,
18 | IMapper mapper)
19 | {
20 | _repository = repository;
21 | _logger = logger;
22 | _mapper = mapper;
23 | }
24 |
25 | public ProjectDto CreateOneProject(ProjectDtoForCreation projectDto)
26 | {
27 | // Dto -> Entity
28 | var entity = _mapper.Map(projectDto);
29 |
30 | // Repo -> Save
31 | _repository.Project.CreateProject(entity);
32 | _repository.Save();
33 |
34 | // Entity -> Dto
35 | return _mapper.Map(entity);
36 | }
37 |
38 | public IEnumerable GetAllProjects(bool trackChanges)
39 | {
40 | var projects = _repository.Project.GetAllProjects(trackChanges);
41 | var projectDtos = _mapper.Map>(projects);
42 | return projectDtos;
43 | }
44 |
45 | public ProjectDto GetOneProjectById(Guid id, bool trackChanges)
46 | {
47 | var project = _repository.Project.GetOneProjectById(id, trackChanges);
48 | if (project is null)
49 | throw new ProjectNotFoundException(id);
50 | var projectDto = _mapper.Map(project);
51 | return projectDto;
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/Service/Service.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Service/ServiceManager.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 | using Contracts;
3 | using Service.Contracts;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace Service
11 | {
12 | public class ServiceManager : IServiceManager
13 | {
14 | private readonly Lazy _projectService;
15 | private readonly Lazy _employeeService;
16 |
17 | public ServiceManager(IRepositoryManager repository,
18 | ILoggerManager logger,
19 | IMapper mapper)
20 | {
21 | _projectService =
22 | new Lazy(() => new ProjectService(repository, logger, mapper));
23 |
24 | _employeeService =
25 | new Lazy(() => new EmployeeService(repository, logger, mapper));
26 |
27 | }
28 |
29 | public IProjectService ProjectService => _projectService.Value;
30 | public IEmployeeService EmployeeService => _employeeService.Value;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Shared/Class1.cs:
--------------------------------------------------------------------------------
1 | namespace Shared
2 | {
3 | public class Class1
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/Shared/DataTransferObjects/EmployeeDto.cs:
--------------------------------------------------------------------------------
1 | namespace Shared.DataTransferObjects
2 | {
3 | public record EmployeeDto(Guid Id, string FirstName, string LastName, int Age, string Position);
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/Shared/DataTransferObjects/EmployeeDtoForCreation.cs:
--------------------------------------------------------------------------------
1 | namespace Shared.DataTransferObjects
2 | {
3 | public record EmployeeDtoForCreation(string FirstName, string LastName, int Age, string Position);
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/Shared/DataTransferObjects/ProjectDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Shared.DataTransferObjects
8 | {
9 | public record ProjectDto
10 | {
11 | public Guid Id { get; init; }
12 | public string Name { get; init; }
13 | public string Description { get; init; }
14 | public string Field { get; init; }
15 | };
16 |
17 |
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Shared/DataTransferObjects/ProjectDtoForCreation.cs:
--------------------------------------------------------------------------------
1 | namespace Shared.DataTransferObjects
2 | {
3 | public record ProjectDtoForCreation(string Name, string Description, string Field);
4 |
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/Shared/Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WebApiCourse.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.32126.317
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectManagement", "ProjectManagement\ProjectManagement.csproj", "{B79BFFB4-8AC6-4EDE-97A5-CAAE9CCEC8D8}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Entities", "Entities\Entities.csproj", "{93E1C4A3-AFD0-49BE-B3B4-5BC648EA1CFE}"
9 | EndProject
10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Contracts", "Contracts\Contracts.csproj", "{D3E92692-0D23-4D13-BCE9-B6E168674C8B}"
11 | EndProject
12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoggerService", "LoggerService\LoggerService.csproj", "{D899A166-5FA0-4864-9355-4CC7BC8AF5DB}"
13 | EndProject
14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Repository", "Repository\Repository.csproj", "{3FD0BEF0-9136-4C48-856F-48C68A11A22F}"
15 | EndProject
16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Service", "Service\Service.csproj", "{81C9D366-7056-41B9-A0A5-52457FE8E31D}"
17 | EndProject
18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Service.Contracts", "Service.Contracts\Service.Contracts.csproj", "{2AE69792-60A0-4240-97B6-A6B54E830DC2}"
19 | EndProject
20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectManagement.Presentation", "ProjectManagement.Presentation\ProjectManagement.Presentation.csproj", "{FC0F7D7C-B9E4-4A36-9649-D06AC4B7450B}"
21 | EndProject
22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{53170F67-88B5-48EF-AC2C-E67286F548D0}"
23 | EndProject
24 | Global
25 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
26 | Debug|Any CPU = Debug|Any CPU
27 | Release|Any CPU = Release|Any CPU
28 | EndGlobalSection
29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
30 | {B79BFFB4-8AC6-4EDE-97A5-CAAE9CCEC8D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {B79BFFB4-8AC6-4EDE-97A5-CAAE9CCEC8D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {B79BFFB4-8AC6-4EDE-97A5-CAAE9CCEC8D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {B79BFFB4-8AC6-4EDE-97A5-CAAE9CCEC8D8}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {93E1C4A3-AFD0-49BE-B3B4-5BC648EA1CFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 | {93E1C4A3-AFD0-49BE-B3B4-5BC648EA1CFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 | {93E1C4A3-AFD0-49BE-B3B4-5BC648EA1CFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 | {93E1C4A3-AFD0-49BE-B3B4-5BC648EA1CFE}.Release|Any CPU.Build.0 = Release|Any CPU
38 | {D3E92692-0D23-4D13-BCE9-B6E168674C8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {D3E92692-0D23-4D13-BCE9-B6E168674C8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {D3E92692-0D23-4D13-BCE9-B6E168674C8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
41 | {D3E92692-0D23-4D13-BCE9-B6E168674C8B}.Release|Any CPU.Build.0 = Release|Any CPU
42 | {D899A166-5FA0-4864-9355-4CC7BC8AF5DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 | {D899A166-5FA0-4864-9355-4CC7BC8AF5DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 | {D899A166-5FA0-4864-9355-4CC7BC8AF5DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
45 | {D899A166-5FA0-4864-9355-4CC7BC8AF5DB}.Release|Any CPU.Build.0 = Release|Any CPU
46 | {3FD0BEF0-9136-4C48-856F-48C68A11A22F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 | {3FD0BEF0-9136-4C48-856F-48C68A11A22F}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 | {3FD0BEF0-9136-4C48-856F-48C68A11A22F}.Release|Any CPU.ActiveCfg = Release|Any CPU
49 | {3FD0BEF0-9136-4C48-856F-48C68A11A22F}.Release|Any CPU.Build.0 = Release|Any CPU
50 | {81C9D366-7056-41B9-A0A5-52457FE8E31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 | {81C9D366-7056-41B9-A0A5-52457FE8E31D}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 | {81C9D366-7056-41B9-A0A5-52457FE8E31D}.Release|Any CPU.ActiveCfg = Release|Any CPU
53 | {81C9D366-7056-41B9-A0A5-52457FE8E31D}.Release|Any CPU.Build.0 = Release|Any CPU
54 | {2AE69792-60A0-4240-97B6-A6B54E830DC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {2AE69792-60A0-4240-97B6-A6B54E830DC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {2AE69792-60A0-4240-97B6-A6B54E830DC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {2AE69792-60A0-4240-97B6-A6B54E830DC2}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {FC0F7D7C-B9E4-4A36-9649-D06AC4B7450B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 | {FC0F7D7C-B9E4-4A36-9649-D06AC4B7450B}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 | {FC0F7D7C-B9E4-4A36-9649-D06AC4B7450B}.Release|Any CPU.ActiveCfg = Release|Any CPU
61 | {FC0F7D7C-B9E4-4A36-9649-D06AC4B7450B}.Release|Any CPU.Build.0 = Release|Any CPU
62 | {53170F67-88B5-48EF-AC2C-E67286F548D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63 | {53170F67-88B5-48EF-AC2C-E67286F548D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
64 | {53170F67-88B5-48EF-AC2C-E67286F548D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
65 | {53170F67-88B5-48EF-AC2C-E67286F548D0}.Release|Any CPU.Build.0 = Release|Any CPU
66 | EndGlobalSection
67 | GlobalSection(SolutionProperties) = preSolution
68 | HideSolutionNode = FALSE
69 | EndGlobalSection
70 | GlobalSection(ExtensibilityGlobals) = postSolution
71 | SolutionGuid = {C2747F17-3021-4A5B-B615-D05460BF71DF}
72 | EndGlobalSection
73 | EndGlobal
74 |
--------------------------------------------------------------------------------