Giter Site home page Giter Site logo

efcoremocking's Introduction

EFCoreMocking

Overview

This app is an .net Web API, version 7.0 using EF Core with a SqliteDB. The subject is an employee db and includes mocking of repository and controller tests.

Structure

Solution Name: EFCoreMocking

Projects:

  • EFCoreMocking.Api Contains all data and logic-related folders, including all models, view models, services and database context for local Sqlite db. Question and Answer data must be added to the database with required information. A method is run at the beginning of the survey session to load all currently available questions and answers. - MappingProfile.cs - nlog.config

    • /Contracts - IEmployeeRepository.cs - ILoggerManager.cs - IRepositoryBase.cs - IRepositoryWrapper.cs

    • /Controllers - EmployeeController.cs

    • /Data - Datacontext

    • /Entities

      • /DataTransferObjects
        • EmployeeDto.cs
        • EmployeeForCreationDto.cs
        • EmployeeForUpdateDto.cs
      • /Models
        • Employee.cs
    • /Extensions

      • ServiceExtensions.cs
    • /Repositories

      • EmployeeRepository.cs
      • RepositoryBase.cs
      • RepositoryWrapper.cs
    • /Services

      • LoggerManager.cs
  • EFCoreMocking.Tests

    • TestDataHelper.cs
    • /Mocks
      • FakeEmployeeDb.cs
      • MockIEmployeeRepository.cs
      • MockIRepositoryWrapper.cs
    • /Tests
      • EmployeeControllerCreateTests.cs
      • EmployeeControllerDeleteTests.cs
      • EmployeeControllerReadTests.cs
      • EmployeeControllerUpdateTests.cs
      • EmployeesControllerTestWithMockQueryable
      • EmployeesControllerTestWithMoq_EntityFrameworkCore.cs
      • ModelValidationTests.cs

Libraries

  • EFCoreMocking.Api

    • Microsoft.AspNetCore.OpenApi
    • Swashbuckle.AspNetCore
    • Microsoft.EntityFrameworkCore.Tools
    • Microsoft.Data.Sqlite.Core
    • Microsoft.EntityFrameworkCore.Sqlite.Core
    • sqlite-net-pcl
    • SQLitePCLRaw.bundle_green
    • SQLitePCLRaw.provider.dynamic_cdecl
    • Microsoft.EntityFrameworkCore
    • NLog.Extensions.Logging
    • AutoMapper.Extensions.Microsoft.DependencyInjection
  • EFCoreMocking.Tests

    • Microsoft.NET.Test.Sdk
    • xunit
    • xunit.runner.visualstudio
    • coverlet.collector
    • Moq.EntityFrameworkCore
    • MockQueryable.Moq
    • Microsoft.AspNetCore.Mvc.Testing
    • FluentAssertions"

Other Features

  • .Api
    • Data Transfer Objects
    • Repository Base Wrapper
  • .Tests
    • Mocks
    • Separate Controller CRUD tests

efcoremocking's People

Contributors

missym2 avatar

Stargazers

 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.