Coder Social home page Coder Social logo

d20c2's Introduction

Day-20 Challenge-2: Adding Entity Framework to DA Layer of Day-8's Challenge

  • Author: Sakthi (Sandy) Santhosh
  • Created on: 09/05/2024

Note

To see the differences made to the data access layer, you can view the diff in the latest commit.

Description

This .NET solution is a part of 3-tier architecture-based application. The goal of the application is to manage employees. This .NET solution implements the 2nd and 3rd layer of the architecture, that is the business logic layer and the data access layer. The DAL (layer-3) provides an interface to the second layer (business logic layer) that the layer can use. This decouples low-level code from high-level code, adhering to dependency inversion, which is one of the principles in the SOLID principles.

Why Layered Application?

I mean, if you have a look at the code, we see that the business logic layer implements some methods same as the methods implemented in data access layer. But it also isolates the implementation of accessing this data hence decoupling the data access logic from the business of logic. Separation of concern is used here which makes our lifes way easier. All we gotta do is to instantiate the EmployeeService with the interface (contract) of data access layer. Since we're passing this contract to the business logic layer, we can be assured that the set of methods are implemented. This also provides one more advantage. Say we change the data layer from a database to a in-memory data store. In that case, the business logic layer has nothing to worry about because it is the responsibility of the data access layer to re-implement the interface.

Build

Open a shell instance on your machine, navigate to the project folder and run the following command:

dotnet build --project ./EmployeeLibrary/EmployeeLibrary.csproj

This will output the assembly as DLL to ./EmployeeLibrary/bin/ folder.

Information

System

  • Operating System: Debian Headless 12.0
  • Kernel: 6.1.0-rpi4-rpi-v8
  • Architecture: aarch64 (arm64)

.NET Framework

  • SDK: 8.0.204
  • Runtimes Installed:
    • ASP.NET: 8.0.4
    • .NET Core: 8.0.4

Contribution

This project was created for learning and development purposes only. Any contributions to the repository is discouraged.

d20c2's People

Contributors

ssanthosh010303 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.