├── Library.Domain ├── BaseEntity.cs ├── Repositories │ └── IBookRepository.cs ├── Entities │ └── Book.cs ├── Library.Domain.csproj ├── UnitOfWork │ └── IUnitOfWork.cs └── IGenericRepository.cs ├── Domain ├── Repositories │ └── IBookRepository.cs ├── Models │ └── Book.cs ├── BaseEntity.cs ├── DomainOmg.csproj ├── UnitOfWork │ └── IUnitOfWork.cs └── IGenericRepository.cs ├── UnitOfWorkRepositoryPatterns ├── appsettings.Development.json ├── Dtos │ └── BookDto.cs ├── appsettings.json ├── Services │ ├── IBookService.cs │ └── BookService.cs ├── Controllers │ └── BooksController.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Dockerfile └── UnitOfWorkRepositoryPatterns.csproj ├── Infrastructure ├── LibraryDbContext.cs ├── Repositories │ └── BookRepository.cs ├── InfrastructureOmg.csproj ├── UnitOfWork │ └── UnitOfWork.cs └── GenericRepository.cs ├── Library.Infrastructure ├── LibraryDbContext.cs ├── Repositories │ └── BookRepository.cs ├── UnitOfWork │ └── UnitOfWork.cs ├── Library.Infrastructure.csproj ├── Migrations │ ├── 20220328210219_Create_Library.cs │ ├── LibraryDbContextModelSnapshot.cs │ └── 20220328210219_Create_Library.Designer.cs └── GenericRepository.cs ├── .dockerignore ├── README.md ├── UnitOfWorkRepositoryPatterns.sln ├── .gitattributes └── .gitignore /Library.Domain/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | namespace Library.Domain 2 | { 3 | public abstract class BaseEntity 4 | { 5 | public Guid Id { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Domain/Repositories/IBookRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Models; 2 | 3 | namespace Domain.Repositories 4 | { 5 | public interface IBookRepository : IGenericRepository 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Library.Domain/Repositories/IBookRepository.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Entities; 2 | 3 | namespace Library.Domain.Repositories 4 | { 5 | public interface IBookRepository : IGenericRepository 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Domain/Models/Book.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Domain.Models 3 | { 4 | public class Book : BaseEntity 5 | { 6 | public string Title { get; set; } 7 | public int NmPages { get; set; } 8 | public string Genre { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Library.Domain/Entities/Book.cs: -------------------------------------------------------------------------------- 1 | namespace Library.Domain.Entities 2 | { 3 | public class Book : BaseEntity 4 | { 5 | public string Title { get; set; } 6 | public int NmPages { get; set; } 7 | public string Genre { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Library.Domain/Library.Domain.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Dtos/BookDto.cs: -------------------------------------------------------------------------------- 1 | namespace UnitOfWorkRepositoryPatterns.Dtos 2 | { 3 | public class BookDto 4 | { 5 | public string Title { get; set; } 6 | public int NmPages { get; set; } 7 | public string Genre { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Domain/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Domain 8 | { 9 | public abstract class BaseEntity 10 | { 11 | public Guid Id { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Domain/DomainOmg.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "ConnectionStrings": { 9 | "LibraryConnection": "{YOUR_CONNECTION_STRING}" 10 | }, 11 | "AllowedHosts": "*" 12 | } 13 | -------------------------------------------------------------------------------- /Infrastructure/LibraryDbContext.cs: -------------------------------------------------------------------------------- 1 | using Domain.Models; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Infrastructure 5 | { 6 | public class LibraryDbContext : DbContext 7 | { 8 | public LibraryDbContext(DbContextOptions options) : base(options) { } 9 | 10 | public DbSet Books; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Services/IBookService.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Entities; 2 | using UnitOfWorkRepositoryPatterns.Dtos; 3 | 4 | namespace UnitOfWorkRepositoryPatterns.Services 5 | { 6 | public interface IBookService 7 | { 8 | public Task> GetAll(); 9 | public Task AddBook(BookDto book); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Library.Domain/UnitOfWork/IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Repositories; 2 | 3 | namespace Library.Domain.UnitOfWork 4 | { 5 | public interface IUnitOfWork 6 | { 7 | IBookRepository BookRepository { get; } 8 | void Commit(); 9 | void Rollback(); 10 | Task CommitAsync(); 11 | Task RollbackAsync(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Library.Infrastructure/LibraryDbContext.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Library.Infrastructure 5 | { 6 | public class LibraryDbContext : DbContext 7 | { 8 | public LibraryDbContext(DbContextOptions options) : base(options) { } 9 | 10 | public DbSet Books { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Library.Infrastructure/Repositories/BookRepository.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Entities; 2 | using Library.Domain.Repositories; 3 | 4 | namespace Library.Infrastructure.Repositories 5 | { 6 | public class BookRepository : GenericRepository, IBookRepository 7 | { 8 | public BookRepository(LibraryDbContext dbContext) : base(dbContext) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /Domain/UnitOfWork/IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using Domain.Repositories; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Domain.UnitOfWork 9 | { 10 | public interface IUnitOfWork 11 | { 12 | IBookRepository BookRepository { get; } 13 | void Commit(); 14 | void Rollback(); 15 | Task CommitAsync(); 16 | Task RollbackAsync(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Infrastructure/Repositories/BookRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain; 2 | using Domain.Models; 3 | using Domain.Repositories; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Infrastructure.Repositories 11 | { 12 | public class BookRepository : GenericRepository, IBookRepository 13 | { 14 | public BookRepository(LibraryDbContext dbContext) : base(dbContext) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Infrastructure/InfrastructureOmg.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # What are the Repository and Unit of Work Patterns? 2 | According to the official MS Docs, repositories are classes or components that encapsulate the logic required to access data sources. 3 | They include methods for common operations, providing better decoupling and maintainability. 4 | The Unit of Work pattern is used to aggregate multiple operations into a single transaction. 5 | With this we ensure that either all operations succeed or fail as a single unit. 6 | 7 | # DbContext 8 | DbContext class is a combination of the Unit of Work and Repository patterns, where the DbContext is an abstraction of the Unit of Work pattern and a DbSet is an abstraction of the Repository pattern. 9 | 10 | Link to article: https://www.linkedin.com/pulse/repository-unit-work-patterns-net-core-dimitar-iliev/ 11 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Controllers/BooksController.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Entities; 2 | using Microsoft.AspNetCore.Mvc; 3 | using UnitOfWorkRepositoryPatterns.Dtos; 4 | using UnitOfWorkRepositoryPatterns.Services; 5 | 6 | namespace UnitOfWorkRepositoryPatterns.Controllers 7 | { 8 | [ApiController] 9 | [Route("[controller]")] 10 | public class BooksController : ControllerBase 11 | { 12 | public IBookService _bookService { get; set; } 13 | public BooksController(IBookService bookService) 14 | { 15 | _bookService = bookService; 16 | } 17 | 18 | [HttpGet(Name = "Books")] 19 | public async Task> GetAll() 20 | => await _bookService.GetAll(); 21 | 22 | [HttpPost] 23 | public async Task AddBook([FromBody] BookDto book) 24 | { 25 | await _bookService.AddBook(book); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Services/BookService.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Entities; 2 | using Library.Domain.UnitOfWork; 3 | using UnitOfWorkRepositoryPatterns.Dtos; 4 | 5 | namespace UnitOfWorkRepositoryPatterns.Services 6 | { 7 | public class BookService : IBookService 8 | { 9 | public IUnitOfWork _unitOfWork; 10 | public BookService(IUnitOfWork unitOfWork) 11 | { 12 | _unitOfWork = unitOfWork; 13 | } 14 | 15 | public async Task AddBook(BookDto bookDto) 16 | { 17 | var book = new Book 18 | { 19 | Genre = bookDto.Genre, 20 | NmPages = bookDto.NmPages, 21 | Title = bookDto.Title, 22 | }; 23 | 24 | _unitOfWork.BookRepository.Add(book); 25 | await _unitOfWork.CommitAsync(); 26 | } 27 | 28 | public async Task> GetAll() 29 | => await _unitOfWork.BookRepository.GetAllAsync(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Infrastructure/UnitOfWork/UnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using Domain.Repositories; 2 | using Domain.UnitOfWork; 3 | using Infrastructure.Repositories; 4 | 5 | namespace Infrastructure.UnitOfWork 6 | { 7 | public class UnitOfWork : IUnitOfWork 8 | { 9 | private readonly LibraryDbContext _dbContext; 10 | private IBookRepository _bookRepository; 11 | 12 | public UnitOfWork(LibraryDbContext dbContext) 13 | { 14 | _dbContext = dbContext; 15 | } 16 | 17 | public IBookRepository BookRepository 18 | { 19 | get { return _bookRepository = _bookRepository ?? new BookRepository(_dbContext); } 20 | } 21 | 22 | public void Commit() 23 | => _dbContext.SaveChanges(); 24 | 25 | public async Task CommitAsync() 26 | => await _dbContext.SaveChangesAsync(); 27 | 28 | public void Rollback() 29 | => _dbContext.Dispose(); 30 | 31 | public async Task RollbackAsync() 32 | => await _dbContext.DisposeAsync(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Library.Infrastructure/UnitOfWork/UnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.Repositories; 2 | using Library.Domain.UnitOfWork; 3 | using Library.Infrastructure.Repositories; 4 | 5 | namespace Library.Infrastructure.UnitOfWork 6 | { 7 | public class UnitOfWork : IUnitOfWork 8 | { 9 | private readonly LibraryDbContext _dbContext; 10 | private IBookRepository _bookRepository; 11 | 12 | public UnitOfWork(LibraryDbContext dbContext) 13 | { 14 | _dbContext = dbContext; 15 | } 16 | 17 | public IBookRepository BookRepository 18 | { 19 | get { return _bookRepository = _bookRepository ?? new BookRepository(_dbContext); } 20 | } 21 | 22 | public void Commit() 23 | => _dbContext.SaveChanges(); 24 | 25 | public async Task CommitAsync() 26 | => await _dbContext.SaveChangesAsync(); 27 | 28 | public void Rollback() 29 | => _dbContext.Dispose(); 30 | 31 | public async Task RollbackAsync() 32 | => await _dbContext.DisposeAsync(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Domain/IGenericRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Linq.Expressions; 2 | 3 | namespace Domain 4 | { 5 | public interface IGenericRepository where T : class 6 | { 7 | T Get(Expression> expression); 8 | IEnumerable GetAll(); 9 | IEnumerable GetAll(Expression> expression); 10 | void Add(T entity); 11 | void AddRange(IEnumerable entities); 12 | void Remove(T entity); 13 | void RemoveRange(IEnumerable entities); 14 | void Update(T entity); 15 | void UpdateRange(IEnumerable entities); 16 | Task GetAsync(Expression> expression, CancellationToken cancellationToken = default); 17 | Task> GetAllAsync(CancellationToken cancellationToken = default); 18 | Task> GetAllAsync(Expression> expression, CancellationToken cancellationToken = default); 19 | Task AddAsync(T entity, CancellationToken cancellationToken = default); 20 | Task AddRangeAsync(IEnumerable entities, CancellationToken cancellationToken = default); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Library.Domain/IGenericRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Linq.Expressions; 2 | 3 | namespace Library.Domain 4 | { 5 | public interface IGenericRepository where T : class 6 | { 7 | T Get(Expression> expression); 8 | IEnumerable GetAll(); 9 | IEnumerable GetAll(Expression> expression); 10 | void Add(T entity); 11 | void AddRange(IEnumerable entities); 12 | void Remove(T entity); 13 | void RemoveRange(IEnumerable entities); 14 | void Update(T entity); 15 | void UpdateRange(IEnumerable entities); 16 | Task GetAsync(Expression> expression, CancellationToken cancellationToken = default); 17 | Task> GetAllAsync(CancellationToken cancellationToken = default); 18 | Task> GetAllAsync(Expression> expression, CancellationToken cancellationToken = default); 19 | Task AddAsync(T entity, CancellationToken cancellationToken = default); 20 | Task AddRangeAsync(IEnumerable entities, CancellationToken cancellationToken = default); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Program.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain.UnitOfWork; 2 | using Library.Infrastructure; 3 | using Library.Infrastructure.UnitOfWork; 4 | using Microsoft.EntityFrameworkCore; 5 | using UnitOfWorkRepositoryPatterns.Services; 6 | 7 | var builder = WebApplication.CreateBuilder(args); 8 | 9 | // Add services to the container. 10 | 11 | builder.Services.AddControllers(); 12 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 13 | builder.Services.AddEndpointsApiExplorer(); 14 | builder.Services.AddSwaggerGen(); 15 | 16 | builder.Services.AddTransient(typeof(IBookService), typeof(BookService)); 17 | 18 | //Database 19 | builder.Services.AddScoped(); 20 | builder.Services.AddDbContext( 21 | x => x.UseSqlServer(builder.Configuration.GetConnectionString("LibraryConnection"))); 22 | 23 | var app = builder.Build(); 24 | 25 | // Configure the HTTP request pipeline. 26 | if (app.Environment.IsDevelopment()) 27 | { 28 | app.UseSwagger(); 29 | app.UseSwaggerUI(); 30 | } 31 | 32 | app.UseHttpsRedirection(); 33 | 34 | app.UseAuthorization(); 35 | 36 | app.MapControllers(); 37 | 38 | app.Run(); 39 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:46925", 8 | "sslPort": 44370 9 | } 10 | }, 11 | "profiles": { 12 | "UnitOfWorkRepositoryPatterns": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "launchUrl": "swagger", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | }, 19 | "applicationUrl": "https://localhost:7213;http://localhost:5213", 20 | "dotnetRunMessages": true 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | }, 30 | "Docker": { 31 | "commandName": "Docker", 32 | "launchBrowser": true, 33 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", 34 | "publishAllPorts": true, 35 | "useSSL": true 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Library.Infrastructure/Library.Infrastructure.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | 17 | 18 | all 19 | runtime; build; native; contentfiles; analyzers; buildtransitive 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Library.Infrastructure/Migrations/20220328210219_Create_Library.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | #nullable disable 5 | 6 | namespace Library.Infrastructure.Migrations 7 | { 8 | public partial class Create_Library : Migration 9 | { 10 | protected override void Up(MigrationBuilder migrationBuilder) 11 | { 12 | migrationBuilder.CreateTable( 13 | name: "Books", 14 | columns: table => new 15 | { 16 | Id = table.Column(type: "uniqueidentifier", nullable: false), 17 | Title = table.Column(type: "nvarchar(max)", nullable: false), 18 | NmPages = table.Column(type: "int", nullable: false), 19 | Genre = table.Column(type: "nvarchar(max)", nullable: false) 20 | }, 21 | constraints: table => 22 | { 23 | table.PrimaryKey("PK_Books", x => x.Id); 24 | }); 25 | } 26 | 27 | protected override void Down(MigrationBuilder migrationBuilder) 28 | { 29 | migrationBuilder.DropTable( 30 | name: "Books"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed. 4 | #For more information, please see https://aka.ms/containercompat 5 | 6 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 7 | WORKDIR /app 8 | EXPOSE 80 9 | EXPOSE 443 10 | 11 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 12 | WORKDIR /src 13 | COPY ["UnitOfWorkRepositoryPatterns/UnitOfWorkRepositoryPatterns.csproj", "UnitOfWorkRepositoryPatterns/"] 14 | COPY ["Library.Domain/Library.Domain.csproj", "Library.Domain/"] 15 | COPY ["Library.Infrastructure/Library.Infrastructure.csproj", "Library.Infrastructure/"] 16 | RUN dotnet restore "UnitOfWorkRepositoryPatterns/UnitOfWorkRepositoryPatterns.csproj" 17 | COPY . . 18 | WORKDIR "/src/UnitOfWorkRepositoryPatterns" 19 | RUN dotnet build "UnitOfWorkRepositoryPatterns.csproj" -c Release -o /app/build 20 | 21 | FROM build AS publish 22 | RUN dotnet publish "UnitOfWorkRepositoryPatterns.csproj" -c Release -o /app/publish 23 | 24 | FROM base AS final 25 | WORKDIR /app 26 | COPY --from=publish /app/publish . 27 | ENTRYPOINT ["dotnet", "UnitOfWorkRepositoryPatterns.dll"] -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns/UnitOfWorkRepositoryPatterns.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 429110b8-308b-46d0-9142-b059dc1327c8 8 | Windows 9 | 10 | 11 | 12 | 13 | all 14 | runtime; build; native; contentfiles; analyzers; buildtransitive 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Library.Infrastructure/Migrations/LibraryDbContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Library.Infrastructure; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore.Infrastructure; 6 | using Microsoft.EntityFrameworkCore.Metadata; 7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 8 | 9 | #nullable disable 10 | 11 | namespace Library.Infrastructure.Migrations 12 | { 13 | [DbContext(typeof(LibraryDbContext))] 14 | partial class LibraryDbContextModelSnapshot : ModelSnapshot 15 | { 16 | protected override void BuildModel(ModelBuilder modelBuilder) 17 | { 18 | #pragma warning disable 612, 618 19 | modelBuilder 20 | .HasAnnotation("ProductVersion", "6.0.3") 21 | .HasAnnotation("Relational:MaxIdentifierLength", 128); 22 | 23 | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); 24 | 25 | modelBuilder.Entity("Library.Domain.Models.Book", b => 26 | { 27 | b.Property("Id") 28 | .ValueGeneratedOnAdd() 29 | .HasColumnType("uniqueidentifier"); 30 | 31 | b.Property("Genre") 32 | .IsRequired() 33 | .HasColumnType("nvarchar(max)"); 34 | 35 | b.Property("NmPages") 36 | .HasColumnType("int"); 37 | 38 | b.Property("Title") 39 | .IsRequired() 40 | .HasColumnType("nvarchar(max)"); 41 | 42 | b.HasKey("Id"); 43 | 44 | b.ToTable("Books"); 45 | }); 46 | #pragma warning restore 612, 618 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Library.Infrastructure/Migrations/20220328210219_Create_Library.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Library.Infrastructure; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore.Infrastructure; 6 | using Microsoft.EntityFrameworkCore.Metadata; 7 | using Microsoft.EntityFrameworkCore.Migrations; 8 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 9 | 10 | #nullable disable 11 | 12 | namespace Library.Infrastructure.Migrations 13 | { 14 | [DbContext(typeof(LibraryDbContext))] 15 | [Migration("20220328210219_Create_Library")] 16 | partial class Create_Library 17 | { 18 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 19 | { 20 | #pragma warning disable 612, 618 21 | modelBuilder 22 | .HasAnnotation("ProductVersion", "6.0.3") 23 | .HasAnnotation("Relational:MaxIdentifierLength", 128); 24 | 25 | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); 26 | 27 | modelBuilder.Entity("Library.Domain.Models.Book", b => 28 | { 29 | b.Property("Id") 30 | .ValueGeneratedOnAdd() 31 | .HasColumnType("uniqueidentifier"); 32 | 33 | b.Property("Genre") 34 | .IsRequired() 35 | .HasColumnType("nvarchar(max)"); 36 | 37 | b.Property("NmPages") 38 | .HasColumnType("int"); 39 | 40 | b.Property("Title") 41 | .IsRequired() 42 | .HasColumnType("nvarchar(max)"); 43 | 44 | b.HasKey("Id"); 45 | 46 | b.ToTable("Books"); 47 | }); 48 | #pragma warning restore 612, 618 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Infrastructure/GenericRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain; 2 | using Microsoft.EntityFrameworkCore; 3 | using System.Linq.Expressions; 4 | 5 | namespace Infrastructure 6 | { 7 | public class GenericRepository : IGenericRepository where T : class 8 | { 9 | protected readonly LibraryDbContext _dbContext; 10 | private readonly DbSet _entitiySet; 11 | 12 | public GenericRepository(LibraryDbContext dbContext) 13 | { 14 | _dbContext = dbContext; 15 | _entitiySet = _dbContext.Set(); 16 | } 17 | 18 | public void Add(T entity) => _dbContext.Add(entity); 19 | 20 | public async Task AddAsync(T entity, CancellationToken cancellationToken = default) => await _dbContext.AddAsync(entity); 21 | 22 | public void AddRange(IEnumerable entities) => _dbContext.AddRange(entities); 23 | 24 | public async Task AddRangeAsync(IEnumerable entities, CancellationToken cancellationToken = default) => await _dbContext.AddRangeAsync(entities); 25 | 26 | public T Get(Expression> expression) => _entitiySet.FirstOrDefault(expression); 27 | 28 | public IEnumerable GetAll() => _entitiySet.AsEnumerable(); 29 | 30 | public IEnumerable GetAll(Expression> expression) => _entitiySet.Where(expression).AsEnumerable(); 31 | 32 | public async Task> GetAllAsync(CancellationToken cancellationToken = default) => await _entitiySet.ToListAsync(cancellationToken); 33 | 34 | public async Task> GetAllAsync(Expression> expression, CancellationToken cancellationToken = default) => await _entitiySet.Where(expression).ToListAsync(cancellationToken); 35 | 36 | public async Task GetAsync(Expression> expression, CancellationToken cancellationToken = default) => await _entitiySet.FirstOrDefaultAsync(expression); 37 | 38 | public void Remove(T entity) => _dbContext.Remove(entity); 39 | 40 | public void RemoveRange(IEnumerable entities) => _dbContext.RemoveRange(entities); 41 | 42 | public void Update(T entity) => _dbContext.Update(entity); 43 | 44 | public void UpdateRange(IEnumerable entities) => _dbContext.UpdateRange(entities); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /UnitOfWorkRepositoryPatterns.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.32112.339 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitOfWorkRepositoryPatterns", "UnitOfWorkRepositoryPatterns\UnitOfWorkRepositoryPatterns.csproj", "{1972A721-C33D-4109-AE45-A2285C7DB3A6}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library.Domain", "Library.Domain\Library.Domain.csproj", "{B82CDE7B-995B-4696-935B-7D2336F8FE29}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library.Infrastructure", "Library.Infrastructure\Library.Infrastructure.csproj", "{1AEB8355-7A5D-488C-AA89-487EAC3FCCA3}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {1972A721-C33D-4109-AE45-A2285C7DB3A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {1972A721-C33D-4109-AE45-A2285C7DB3A6}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {1972A721-C33D-4109-AE45-A2285C7DB3A6}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {1972A721-C33D-4109-AE45-A2285C7DB3A6}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {B82CDE7B-995B-4696-935B-7D2336F8FE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {B82CDE7B-995B-4696-935B-7D2336F8FE29}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {B82CDE7B-995B-4696-935B-7D2336F8FE29}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {B82CDE7B-995B-4696-935B-7D2336F8FE29}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {1AEB8355-7A5D-488C-AA89-487EAC3FCCA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {1AEB8355-7A5D-488C-AA89-487EAC3FCCA3}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {1AEB8355-7A5D-488C-AA89-487EAC3FCCA3}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {1AEB8355-7A5D-488C-AA89-487EAC3FCCA3}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {095A0A3D-1CF9-4E3D-A639-97F224392EA3} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /Library.Infrastructure/GenericRepository.cs: -------------------------------------------------------------------------------- 1 | using Library.Domain; 2 | using Microsoft.EntityFrameworkCore; 3 | using System.Linq.Expressions; 4 | 5 | namespace Library.Infrastructure 6 | { 7 | public class GenericRepository : IGenericRepository where T : class 8 | { 9 | protected readonly LibraryDbContext _dbContext; 10 | private readonly DbSet _entitiySet; 11 | 12 | public GenericRepository(LibraryDbContext dbContext) 13 | { 14 | _dbContext = dbContext; 15 | _entitiySet = _dbContext.Set(); 16 | } 17 | 18 | public void Add(T entity) 19 | => _dbContext.Add(entity); 20 | 21 | public async Task AddAsync(T entity, CancellationToken cancellationToken = default) 22 | => await _dbContext.AddAsync(entity, cancellationToken); 23 | 24 | public void AddRange(IEnumerable entities) 25 | => _dbContext.AddRange(entities); 26 | 27 | public async Task AddRangeAsync(IEnumerable entities, CancellationToken cancellationToken = default) 28 | => await _dbContext.AddRangeAsync(entities, cancellationToken); 29 | 30 | public T Get(Expression> expression) 31 | => _entitiySet.FirstOrDefault(expression); 32 | 33 | public IEnumerable GetAll() 34 | => _entitiySet.AsEnumerable(); 35 | 36 | public IEnumerable GetAll(Expression> expression) 37 | => _entitiySet.Where(expression).AsEnumerable(); 38 | 39 | public async Task> GetAllAsync(CancellationToken cancellationToken = default) 40 | => await _entitiySet.ToListAsync(cancellationToken); 41 | 42 | public async Task> GetAllAsync(Expression> expression, CancellationToken cancellationToken = default) 43 | => await _entitiySet.Where(expression).ToListAsync(cancellationToken); 44 | 45 | public async Task GetAsync(Expression> expression, CancellationToken cancellationToken = default) 46 | => await _entitiySet.FirstOrDefaultAsync(expression, cancellationToken); 47 | 48 | public void Remove(T entity) 49 | => _dbContext.Remove(entity); 50 | 51 | public void RemoveRange(IEnumerable entities) 52 | => _dbContext.RemoveRange(entities); 53 | 54 | public void Update(T entity) 55 | => _dbContext.Update(entity); 56 | 57 | public void UpdateRange(IEnumerable entities) 58 | => _dbContext.UpdateRange(entities); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd --------------------------------------------------------------------------------