All Projects → voronov-maxim → Odatatoentity

voronov-maxim / Odatatoentity

Licence: mit
OData .net core

Projects that are alternatives of or similar to Odatatoentity

Hotchocolate
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
Stars: ✭ 3,009 (+2471.79%)
Mutual labels:  graphql, asp-net-core
.NET-Core-Learning-Journey
Some of the projects i made when starting to learn .NET Core
Stars: ✭ 37 (-68.38%)
Mutual labels:  entity-framework, asp-net-core
Onion Architecture Asp.net Core
WhiteApp API solution template which is built on Onion Architecture with all essential feature using .NET 5!
Stars: ✭ 196 (+67.52%)
Mutual labels:  entity-framework, asp-net-core
Frapper
ASP.NET Core 3.1 Beginners project template with complete Custom User Management and lot's of other useful Features Which Helps you for Rapid Application Development.
Stars: ✭ 129 (+10.26%)
Mutual labels:  entity-framework, asp-net-core
Framework
.NET Core Extensions and Helper NuGet packages.
Stars: ✭ 399 (+241.03%)
Mutual labels:  graphql, asp-net-core
contoso-university
Contoso University demo using asp net core and related technologies
Stars: ✭ 42 (-64.1%)
Mutual labels:  entity-framework, asp-net-core
Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
Stars: ✭ 2,864 (+2347.86%)
Mutual labels:  graphql, asp-net-core
Nopcommerce
The most popular open-source eCommerce shopping cart solution based on ASP.NET Core
Stars: ✭ 6,827 (+5735.04%)
Mutual labels:  entity-framework, asp-net-core
SignalR-Core-SqlTableDependency
Shows how the new SignalR Core works with hubs and sockets, also how it can integrate with SqlTableDependency API.
Stars: ✭ 36 (-69.23%)
Mutual labels:  entity-framework, asp-net-core
OrdersManagementSystem
Project demonstrates usage of Prism composition library, Material design library, SQL Server, Entity Framework in WPF application
Stars: ✭ 29 (-75.21%)
Mutual labels:  entity-framework, asp-net-core
Starwars
GraphQL 'Star Wars' example using GraphQL for .NET, ASP.NET Core, Entity Framework Core
Stars: ✭ 559 (+377.78%)
Mutual labels:  graphql, asp-net-core
Efcoreinaction Secondedition
Supporting repo to go with book "Entity Framework Core in Action", second edition
Stars: ✭ 96 (-17.95%)
Mutual labels:  entity-framework, asp-net-core
Automatic Api
A list of software that turns your database into a REST/GraphQL API
Stars: ✭ 1,583 (+1252.99%)
Mutual labels:  graphql
Efcore
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
Stars: ✭ 10,838 (+9163.25%)
Mutual labels:  entity-framework
Graphql Codegen Hasura
code-generator plugins for hasura/apollo-gql/typescript development
Stars: ✭ 113 (-3.42%)
Mutual labels:  graphql
Gitstats
An open source github contribution analyzer
Stars: ✭ 115 (-1.71%)
Mutual labels:  graphql
Fanray
A blog built with ASP.NET Core
Stars: ✭ 117 (+0%)
Mutual labels:  asp-net-core
Recaptcha Net
reCAPTCHA for .NET library lets you easily use Google's reCAPTCHA in an ASP.NET Web Forms / MVC / ASP.NET Core application.
Stars: ✭ 116 (-0.85%)
Mutual labels:  asp-net-core
Graphql Live Query
Realtime GraphQL Live Queries with JavaScript
Stars: ✭ 112 (-4.27%)
Mutual labels:  graphql
Crudl Example Django
CRUDL with Django, DRF/Graphene and SQLite
Stars: ✭ 113 (-3.42%)
Mutual labels:  graphql

OdataToEntity

Wiki
Travis

OData .net core

This library provides a simple approach to creating OData service from ORM data context. This translates the OData query into an expression tree and passes it to the ORM framework. Supported ORM: Entity Framework 6, Entity Framework Core, Linq2Db

public sealed class OrderContext : DbContext
{
    public DbSet<Customer> Customers { get; set; }
    public DbSet<Order> Orders { get; set; }

    public IEnumerable<Order> GetOrders(int? id, String name, OrderStatus? status) => throw new NotImplementedException();
}

Build OData EdmModel

Buid from entity classes marked data annotation attribute, the general case for all providers

//Create adapter data access, where OrderContext your DbContext
var dataAdapter = new OeEfCoreDataAdapter<Model.OrderContext>();
//Build OData Edm Model
EdmModel edmModel = dataAdapter.BuildEdmModel();

Build from the Entity Framework Core where the data context uses the "Fluent API" (without using attributes)

//Create adapter data access, where OrderContext your DbContext
var dataAdapter = new OeEfCoreDataAdapter<Model.OrderContext>();
//Build OData Edm Model
EdmModel edmModel = dataAdapter.BuildEdmModelFromEfCoreModel();

Build from the Entity Framework 6 where the data context uses the "Fluent API" (without using attributes)

//Create adapter data access, where OrderEf6Context your DbContext
var dataAdapter = new OeEf6DataAdapter<OrderEf6Context>();
//Build OData Edm Model
EdmModel edmModel = dataAdapter.BuildEdmModelFromEf6Model();

Build from multiple data contexts

//Create referenced data adapter
var refDataAdapter = new OeEfCoreDataAdapter<Model.Order2Context>();
//Build referenced Edm Model
EdmModel refModel = refDataAdapter.BuildEdmModel();

//Create root data adapter
var rootDataAdapter = new OeEfCoreDataAdapter<Model.OrderContext>();
//Build root Edm Model
EdmModel rootModel = rootDataAdapter.BuildEdmModel(refModel);

Sample OData query

By default used cached queries parsed to expression tree, which on existing tests allows you to increase the performance up to three times. For disable this feature, you need pass in base constructor OeDataAdapter parameter new OeQueryCache(false). The query is parameterized (i.e. constant expressions are replaced with variables) except null value, therefore for best performance must use database null semantics. For Ef Core method UseRelationalNulls class RelationalDbContextOptionsBuilder<TBuilder, TExtension>, for Ef6 property UseDatabaseNullSemantics class DbContextConfiguration.

//Create adapter data access, where OrderContext your DbContext
var dataAdapter = new OeEfCoreDataAdapter<Model.OrderContext>();
//Create query parser
var parser = new OeParser(new Uri("http://dummy"), dataAdapter.BuildEdmModel());
//Query
var uri = new Uri("http://dummy/Orders?$select=Name");
//The result of the query
var response = new MemoryStream();
//Execute query
await parser.ExecuteGetAsync(uri, OeRequestHeaders.JsonDefault, response, CancellationToken.None);

Dynamic data context

Create server from only connection string

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].