https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL
FirebirdSQL database provider for Entity Framework Core.
https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL
Last synced: about 2 months ago
JSON representation
FirebirdSQL database provider for Entity Framework Core.
- Host: GitHub
- URL: https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL
- Owner: ralmsdeveloper
- License: other
- Archived: true
- Created: 2017-08-23T02:33:07.000Z (almost 8 years ago)
- Default Branch: feature/develop
- Last Pushed: 2020-05-08T21:39:49.000Z (about 5 years ago)
- Last Synced: 2024-10-29T07:21:31.247Z (8 months ago)
- Language: C#
- Size: 1.37 MB
- Stars: 44
- Watchers: 11
- Forks: 26
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-entity-framework-core - EntityFrameworkCore.FirebirdSQL - FirebirdSQL database provider for Entity Framework Core. (Providers / Contents)
README
# Efforts should be redirected to:
https://github.com/cincuranet/FirebirdSql.Data.FirebirdClientEntityFrameworkCore.FirebirdSql for Firebird Server
=====================
[](https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSql)
[](https://raw.githubusercontent.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSql/master/LICENSE) [](https://travis-ci.org/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL/branches)
[](https://ci.appveyor.com/project/ralmsdeveloper/entityframeworkcore-firebirdsql/branch/master)Provider | Package name | Stable (`master` branch) | On test (`dev` branch)
-----------------------|-------------------------------------------|-----------------------------|-------------------------
Firebird SQL | `EntityFrameworkCore.FirebirdSql` | [](https://www.nuget.org/packages/EntityFrameworkCore.FirebirdSql/) | [](https://www.nuget.org/packages/EntityFrameworkCore.FirebirdSql/)The EntityFrameworkCore.FirebirdSql is an Entity Framework Core access provider for Firebird SQL, compatible with version 3.X and earlier versions 2.x.
Same uses the ADO.NET Library [Firebird Client](https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient) written by friend Cincura.
## What we already have:
All basic operations are working wellInsert :heavy_check_mark: Update :heavy_check_mark: Delete :heavy_check_mark:
Insert Bulk :heavy_check_mark: Update Bulk :heavy_check_mark: Delete Bulk :heavy_check_mark:
Includes :heavy_check_mark: Complex Querys :heavy_check_mark:
## Supports:
Guid, TimeStamp, Date, BigInt, Varchar, TextIDENTITY INCREMENT FOR FIREBIRD 3.X And 4.0 (Alpha)
## Example of use DBContext
```csharp
//DataContext
public class BlogContext : DbContext
{
public DbSet Blog { get; set; }
public DbSet Posts { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
string connectionString = "...";
optionsBuilder.UseFirebird(connectionString);
}
protected override void OnModelCreating(ModelBuilder modelo)
{
//Fluent Api
modelo.Entity(entity =>
{
entity.HasIndex(e => e.BlogId)
.HasName("Id")
.IsUnique();
});
}
}public class Blog
{
public int BlogId { get; set; }
public string Url { get; set; }
public List Posts { get; set; }
}
public class Post
{
public int PostId { get; set; }
public string Title { get; set; }
public string Content { get; set; }public int BlogId { get; set; }
public Blog Blog { get; set; }
}
}
```## Example of use add
```csharp
//Sample Use
var cx = new BlogContext();
//one
cx.Blog.Add(new Blog
{
Url = "https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSql"
});
cx.SaveChanges();
//Range
var RangeBlog = new List
{
new Blog{ Url="https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSql" },
new Blog{ Url="https://github.com/ralmsdeveloper/" },
new Blog{ Url="https://blog.ralms.net" },
new Blog{ Url="https://ralms.net" }
};
cx.Blog.AddRange(RangeBlog);
cx.SaveChanges();
```## Example of use update
```csharp
//Sample Use
var cx = new BlogContext();
var blog = cx.Blog.Find(1);
cx.Attach(blog);
blog.Url = "www.ralms.net";
cx.SaveChanges();
```## Example of use delete
```csharp
//Sample Use
var cx = new BlogContext();
var blog = cx.Blog.Find(1);
cx.Delete(blog);
cx.SaveChanges();
```
## Example of use where
```csharp
//Sample Use
var cx = new BlogContext();
var blogs = cx.Blog.Where(p => p.BlogId > 0).ToList();
```