GithubHelp home page GithubHelp logo

kevindockx / aspnetcore6webapideepdive Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 33.0 44 KB

Fully functioning sample and starter files for my ASP.NET Core 6 Web API Deep Dive course

License: MIT License

C# 100.00%

aspnetcore6webapideepdive's People

Contributors

kevindockx 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

Watchers

 avatar  avatar  avatar  avatar  avatar

aspnetcore6webapideepdive's Issues

Suggestion to improve folder structure

Hi Kevin!

In the typical architecture of ASP.NET Core and many other software architectures, the "Models" folder is often used to store classes that represent the application domain entities or business objects, not necessarily for the DTOs.

Therefore, the folder structure can be organized as follows:

"Models" folder:

  • This folder usually contains classes that represent the business entities of the domain. These classes represent the main objects with which the application deals, such as “User”, “Product”, “Order”, among others. They can contain domain-related logic, validations, and entity-specific behaviors.

"DTOs" or "ViewModels" folder:

  • This is where you put the classes that act as Data Transfer Objects (DTOs) or View Models. These classes are used to transfer data between application layers, especially in REST API scenarios. DTOs are usually simple structures containing only the properties needed to transfer data, without any additional logic.

Sample:

/Models
    - Author.cs
    - Course.cs
/DTOs (ou /ViewModels)
    - AuthorDTO.cs
    - CourseDTO.cs
    - CourseForCreationDtoDTO.cs

Thank you,
[Bruno Melo]

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.