Skip to content

Commit fec91d2

Browse files
authored
Merge pull request #214 from nanotaboada/feature/repositories
feature/repositories
2 parents 148f545 + 3fe19b7 commit fec91d2

File tree

12 files changed

+32
-81
lines changed

12 files changed

+32
-81
lines changed

.codacy.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,31 @@
55
exclude_paths:
66

77
# Ignore all root-level metadata and documentation
8-
- '.gitignore' # root Git ignore file
9-
- '.runsettings' # root runsettings file
10-
- 'LICENSE' # root license file
11-
- 'README.md' # root readme
8+
- '.gitignore'
9+
- '.runsettings'
10+
- 'LICENSE'
11+
- 'README.md'
1212

1313
# Ignore all file types that shouldn't be analyzed
14-
- '**.yml' # YAML files anywhere (build, config, pipelines)
15-
- '**.json' # JSON files (settings, config)
16-
- '**.png' # Images, e.g., Swagger diagram
17-
- '**.sln' # Solution files
18-
- '**.csproj' # C# project files
14+
- '**.yml'
15+
- '**.json'
16+
- '**.png'
17+
- '**.sln'
18+
- '**.csproj'
1919

2020
# Ignore generated or infrastructure files
21-
- '**/*Program.cs' # Main entry point, often not useful for static analysis
21+
- '**/*Program.cs'
2222

2323
# Ignore specific folders across any depth in the project
24-
- '**/Configurations/**' # Swagger options, etc
25-
- '**/Data/**' # Repositories, DbContext, database file, etc.
26-
- '**/Enums/**' # Enumeration types
27-
- '**/Mappings/**' # AutoMapper profiles
28-
- '**/Migrations/**' # EF Core migration snapshots
29-
- '**/Models/**' # Domain and DTO models
30-
- '**/Properties/**' # launchSettings.json or AssemblyInfo.cs
31-
- '**/Utilities/**' # Helper extensions or static classes
32-
- '**/Validators/**' # FluentValidation validators
33-
- 'test/**/*' # Entire test suite (unit + integration)
34-
- 'scripts/**/*' # Helper shell scripts
24+
- '**/Configurations/**'
25+
- '**/Data/**'
26+
- '**/Enums/**'
27+
- '**/Mappings/**'
28+
- '**/Migrations/**'
29+
- '**/Models/**'
30+
- '**/Properties/**'
31+
- '**/Repositories/**'
32+
- '**/Utilities/**'
33+
- '**/Validators/**'
34+
- 'test/**/*'
35+
- 'scripts/**/*'

.vscode/tasks.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@
2424
"/consoleloggerparameters:NoSummary;ForceNoAlign"
2525
],
2626
"problemMatcher": "$msCompile"
27-
},
28-
{
29-
"label": "watch",
30-
"command": "dotnet",
31-
"type": "process",
32-
"args": [
33-
"watch",
34-
"run",
35-
"--project",
36-
"${workspaceFolder}/Dotnet.Samples.AspNetCore.WebApi.sln"
37-
],
38-
"problemMatcher": "$msCompile"
3927
}
4028
]
4129
}

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ ignore:
6262
- .*\/Migrations\/.*
6363
- .*\/Models\/.*
6464
- .*\/Properties\/.*
65+
- .*\/Repositories\/.*
6566
- .*\/Utilities\/.*
6667
- .*\/Validators\/.*

src/Dotnet.Samples.AspNetCore.WebApi/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Dotnet.Samples.AspNetCore.WebApi.Data;
33
using Dotnet.Samples.AspNetCore.WebApi.Mappings;
44
using Dotnet.Samples.AspNetCore.WebApi.Models;
5+
using Dotnet.Samples.AspNetCore.WebApi.Repositories;
56
using Dotnet.Samples.AspNetCore.WebApi.Services;
67
using Dotnet.Samples.AspNetCore.WebApi.Validators;
78
using FluentValidation;

src/Dotnet.Samples.AspNetCore.WebApi/Properties/launchSettings.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/Dotnet.Samples.AspNetCore.WebApi/Data/IPlayerRepository.cs renamed to src/Dotnet.Samples.AspNetCore.WebApi/Repositories/IPlayerRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
using Dotnet.Samples.AspNetCore.WebApi.Models;
44

5-
namespace Dotnet.Samples.AspNetCore.WebApi.Data;
5+
namespace Dotnet.Samples.AspNetCore.WebApi.Repositories;
66

77
/// <summary>
88
/// Provides specialized repository operations for Player entities.

src/Dotnet.Samples.AspNetCore.WebApi/Data/IRepository.cs renamed to src/Dotnet.Samples.AspNetCore.WebApi/Repositories/IRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Dotnet.Samples.AspNetCore.WebApi.Data;
1+
namespace Dotnet.Samples.AspNetCore.WebApi.Repositories;
22

33
/// <summary>
44
/// Provides generic repository operations for entities of type <typeparamref name="T"/>.

src/Dotnet.Samples.AspNetCore.WebApi/Data/PlayerRepository.cs renamed to src/Dotnet.Samples.AspNetCore.WebApi/Repositories/PlayerRepository.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
using Dotnet.Samples.AspNetCore.WebApi.Data;
12
using Dotnet.Samples.AspNetCore.WebApi.Models;
23
using Microsoft.EntityFrameworkCore;
34

4-
namespace Dotnet.Samples.AspNetCore.WebApi.Data;
5+
namespace Dotnet.Samples.AspNetCore.WebApi.Repositories;
56

67
public sealed class PlayerRepository(PlayerDbContext dbContext)
78
: Repository<Player>(dbContext),

src/Dotnet.Samples.AspNetCore.WebApi/Data/Repository.cs renamed to src/Dotnet.Samples.AspNetCore.WebApi/Repositories/Repository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Microsoft.EntityFrameworkCore;
22

3-
namespace Dotnet.Samples.AspNetCore.WebApi.Data;
3+
namespace Dotnet.Samples.AspNetCore.WebApi.Repositories;
44

55
public class Repository<T>(DbContext dbContext) : IRepository<T>
66
where T : class

src/Dotnet.Samples.AspNetCore.WebApi/Services/PlayerService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using AutoMapper;
2-
using Dotnet.Samples.AspNetCore.WebApi.Data;
32
using Dotnet.Samples.AspNetCore.WebApi.Models;
3+
using Dotnet.Samples.AspNetCore.WebApi.Repositories;
44
using Microsoft.Extensions.Caching.Memory;
55

66
namespace Dotnet.Samples.AspNetCore.WebApi.Services;

0 commit comments

Comments
 (0)