GithubHelp home page GithubHelp logo

haritha99ch / extendedspecificationpattern-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 37 KB

Showcases an extended specification pattern with projection capability.

License: MIT License

C# 100.00%
aggregate-root clean-architecture domain-driven-design dotnet entity-framework-core generic-repository mssql specification-pattern user-secrets

extendedspecificationpattern-example's Introduction

Specification Pattern In .NET With Projection.

This demo project showcases an extended specification pattern with projection capability, specifically tailored for Entity Framework in .NET. It showcases how the specification pattern can be effectively utilized with projection or selecting during SQL query execution rather than mapping after data retrieval, this pattern is designed to handle selection/projection directly within the SQL query when implementing the repository pattern with specifications.

Setup

Prerequisite

  1. .NET 8 installed on your computer. You can download .NET 8 from the official website (https://dotnet.microsoft.com/download/dotnet/8.0).
  2. An integrated development environment (IDE) to write your code
  3. Git installed on your computer.

Initial setup

  1. Clone the project.
git clone https://github.com/haritha99ch/ExtendedSpecificationPattern-Example.git
cd ExtendedSpecificationPattern-Example
  1. Set Environment variables.
dotnet user-secrets set "SqlServerOptions:ConnectionString" CONNECTIONSTRINGS_DEFAULTCONNECTION --project ./src/ApplicationSettings/
  1. Install all the dependencies.

    dotnet restore
  2. Build the project.

dotnet build
  1. Add migrations and update database.
dotnet ef migrations add InitialMigration --project ./src/Infrastructure/
dotnet ef database update --project ./src/Infrastructure/

Make sure, dotnet-ef tool is installed with dotnet tool install --global dotnet-ef

  1. Run the project.
dotnet run --project ./src/Presentation/

extendedspecificationpattern-example's People

Contributors

haritha99ch avatar

Watchers

 avatar

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.