Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekremgunes/portfolio-website
Graphic designer Portfolio Project with asp.net core mvc,ntier,web
https://github.com/ekremgunes/portfolio-website
ajax asp-net-core automapper dotnet6 error-handling fluentvalidation identity mvc-architecture n-tier-architecture ntier-architecture
Last synced: about 2 months ago
JSON representation
Graphic designer Portfolio Project with asp.net core mvc,ntier,web
- Host: GitHub
- URL: https://github.com/ekremgunes/portfolio-website
- Owner: ekremgunes
- License: mit
- Created: 2022-12-24T15:36:31.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-10T20:52:56.000Z (5 months ago)
- Last Synced: 2024-08-10T21:53:46.372Z (5 months ago)
- Topics: ajax, asp-net-core, automapper, dotnet6, error-handling, fluentvalidation, identity, mvc-architecture, n-tier-architecture, ntier-architecture
- Language: C#
- Homepage:
- Size: 59.2 MB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Portfolio Project
![](https://github.com/ekremgunes/PortfolioProject/blob/master/panel_111.gif)
![](https://github.com/ekremgunes/PortfolioProject/blob/master/panel_222.gif)
```
I used these technologies dotnet6 , MVC -> ViewComponents ,
AJAX ,
N-Tier Architecture ,
EntityFramework (MSSQL) ,
Identity ,
AutoMapper ,
I tried SOLİD,DRY and Yagni principles ,
Error Handling Manually
```> FluentAPI :
```c#
public class ImageConfigurations : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.HasKey(x => x.id);
builder.Property(x => x.imgPath).IsRequired();
builder.HasOne(x => x.contentDetail).WithMany(x => x.images).HasForeignKey(x => x.contentDetailId);
}
}
```
> Clean code examples:```c#
public bool ContentIsValid(ContentCreateDto dto) => _createContentValidator.Validate(dto).IsValid;public bool ContentUpdateIsValid(ContentUpdateDto dto) => _updateContentValidator.Validate(dto).IsValid;
```> Unit Of Work :
```c#
public class Uow : IUow
{
private readonly PortfolioContext _context;public Uow(PortfolioContext context)
{
_context = context;
}public IRepository GetRepository() where T : BaseEntity
{
return new Repository(_context);
}public async Task SaveChangesAsync()
{
await _context.SaveChangesAsync();
}
}
```
> Fluent Validation :
```c#
public class ServiceUpdateDtoValidator : AbstractValidator
{
public ServiceUpdateDtoValidator()
{
RuleFor(x => x.id).NotEmpty().WithMessage("data id not found");
RuleFor(x => x.serviceName).NotEmpty().WithMessage("Service name can't be empty");
RuleFor(x => x.rank).LessThan((short)101).WithMessage("Rank max value is 100");
RuleFor(x => x.rank).GreaterThan((short)0).WithMessage("Rank min value is 1");
}
}
```You can star and look when you forget these :)