Git Product home page Git Product logo

dotnet-api-boilerplate's Introduction

Hello there! ๐Ÿ‘‹

Yan Pitangui | Twitter Yan Pitangui's LinkedIN

Hello, Iโ€™m Yan Pitangui, a software developer based in Brazil.

dotnet-api-boilerplate's People

Contributors

dependabot[bot] avatar prom3theu5 avatar samlatavares avatar snax4a avatar yanpitangui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnet-api-boilerplate's Issues

[FEATURE] DB Context Factory / EFCore 6 Change Tracking challenges

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

[FEATURE] Upgrade to dotnet 6

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.

[FEATURE] Add strongly typed ids to the project

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.

[BUG] misspelled word in the readme

Misspelled word in the readme
In the Docker session of the Readme, the Docker compose command is misspelled.

Expected behavior
docker-compose up -d

Screenshots
image

  • OS: Windows 10 - OS Build 18363.1139
  • Visual Studio Professional 2019
  • .Net SDK 3.0

[BUG] docker-compose issue

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

Brief description of projects

Repository template looks really useful.

Although, it would be helpful to get started with it if you could include brief description of individual projects

[FEATURE] Remove the repository pattern

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.

[FEATURE] JWT Auth

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.

Questionable clean architecture implementation

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.

[FEATURE] Add OpenTelemetry support

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.