yanpitangui / dotnet-api-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA Dotnet 8.0 WebApi template project. MediatR, Swagger, Mapper, Serilog and more implemented.
License: MIT License
A Dotnet 8.0 WebApi template project. MediatR, Swagger, Mapper, Serilog and more implemented.
License: MIT License
Is your feature request related to a problem? Please describe.
As context, I've always been a fan of accessing and creating dbcontexts when I've needed to do multiple db related actions. I feel with this project I should give in and simply adopt the context factory method but no idea how I'd go about doing that.
Problem I'm running into is I've added an ICollection<Hero> Heroes
to the user class but when trying to create it, I continuously getting change tracking problems.
Describe the solution you'd like
Add ICollection<Hero> Heroes
to the User class and adopt (if it's the right solution) a db context factory
Describe alternatives you've considered
I did wonder about scoped vs transient but I feel the context factory might fit better
Additional context
None
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
I would like to have this project updated to dotnet 6.
Describe alternatives you've considered
None.
Additional context
Nothing.
Describe the solution you'd like
Defining entities Ids as separate structs would help differentiate from simple Guids.
Also, using NewId for generation, it would help with index fragmentation.
Hello,
Im trying to run this app on MacOs
As im not using windows In docker-compose.override.yml i only changed this lines :
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
to use named volume:
volumes:
- boilerplatedata
Im not sure what are this strange volumes used for so it would be nice if you could explain it and tell me if i did it correctly.
When i run docker-compose up -d
im getting this error:
Building boilerplate-api
Step 1/19 : FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
---> c3a51e51a0f9
Step 2/19 : WORKDIR /app
---> Using cache
---> 45e66bcf25b5
Step 3/19 : EXPOSE 80
---> Using cache
---> 5d8238c88e4f
Step 4/19 : EXPOSE 443
---> Using cache
---> aa14dc9dc80a
Step 5/19 : FROM mcr.microsoft.com/dotnet/sdk:5.0-buster AS build
ERROR: Service 'boilerplate-api' failed to build : manifest for mcr.microsoft.com/dotnet/sdk:5.0-buster not found: manifest unknown: manifest tagged by "5.0-buster" is not found
I could not find any informations how to fix this issue
Repository template looks really useful.
Although, it would be helpful to get started with it if you could include brief description of individual projects
Context
I would like to see some screenshots (from swagger, visual studio) of the project. That would make it easier to visualize what this project contains.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Since the Dbcontext is already a repository/uow those classes are not needed.
Context
Please add an PT-BR readme, that would make it easier for brazilians to read and use this project.
How to run it on IIS server not console ?
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
I would like to have a way to authorize my controllers and actions, and grant users different access levels to the application.
Describe alternatives you've considered
I considered implementing it myself, but it would be better if the boilerplate already had it.
Additional context
Add any other context or screenshots about the feature request here.
Context
Please add on the documentation information that the tool is used and to why it it used.
Is your feature request related to a problem? Please describe.
Why EntityFramework is being added in the application layer? It must be in the infrastructure layer. application should not be concerned with your underlying database. Even DatabaseFacade
is present in Microsoft.EntityFrameworkCore.Infrastructure
namespace and you are using it in application layer.
using Boilerplate.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Boilerplate.Application.Common;
public interface IContext : IAsyncDisposable, IDisposable
{
public DatabaseFacade Database { get; }
public DbSet<Hero> Heroes { get; }
public Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
Describe alternatives you've considered
Move them to infrastructure, use repository and unit of work pattern.
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
It would be great to have a preconfigured way to instrument this project with OpenTelemetry.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.