Giter Club home page Giter Club logo

filecontextcore's Introduction

FileContextCore Build Status Maintainability

FileContextCore is a "Database"-Provider for Entity Framework Core and adds the ability to store information in files instead of being limited to databases. It enables fast developments because of the advantage of just copy, edit and delete files.

This framework bases on the idea of FileContext by DevMentor (https://github.com/pmizel/DevMentor.Context.FileContext)

Advantages

  • No database needed
  • easy configuration
  • rapid data-modelling, -modification
  • share data through version-control
  • supports all serializable .NET types
  • integrated seamlessly into EF Core
  • diferrent serializer supported (XML, JSON, CSV, Excel)
  • supports encryption
  • supports relations
  • supports multiple databases

!This extension is not intended to be used in production systems!

Install

https://www.nuget.org/packages/FileContextCore/

PM > Install-Package FileContextCore

Configure EF Core

optionsBuilder.UseFileContext();

or

services.AddEntityFramework().AddDbContext<Context>(options => options.UseFileContext());

Example

For an Example check out: Example

Configuration

By default the extension uses JSON-serialization and the DefaultFileManager

Available Serializer

XMLSerializer

Serializes data using System.XML

optionsBuilder.UseFileContext("xml");

CSVSerializer

Serializes data using CsvHelper (https://joshclose.github.io/CsvHelper/)

optionsBuilder.UseFileContext("csv");

JSONSerializer

Serializes data using Newtonsoft Json.NET (http://www.newtonsoft.com/json)

optionsBuilder.UseFileContext("json");

BSONSerializer

Serializes data to bson using Newtonsoft Json.NET (http://www.newtonsoft.com/json)

optionsBuilder.UseFileContext("bson");

EXCELSerializer

Saves files into an .xlsx-file and enables the quick editing of the data using Excel

Uses EEPlus implementation for .Net Core (https://github.com/VahidN/EPPlus.Core)

optionsBuilder.UseFileContext("excel");

//use password
optionsBuilder.UseFileContext("excel:password");

To run on Linux-Systems

sudo apt-get update
sudo apt-get install libgdiplus

File Manager

DefaultFileManager

Saves the data into files

optionsBuilder.UseFileContext("json", "default");

EncryptedFileManager

Encrypts the data and saves them into files

optionsBuilder.UseFileContext("json", "encrypted:password");

Multiple Databases

You can define a name for your database and all the corresponding data will saved in a subfolder. So you are able to use FileContext with multiple DbContext-configurations.

optionsBuilder.UseFileContext(databasename: "database");

Author

Morris Janatzek (morrisjdev)

filecontextcore's People

Contributors

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