Librame 5.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Librame --version 5.0.0
NuGet\Install-Package Librame -Version 5.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Librame" Version="5.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Librame --version 5.0.0
#r "nuget: Librame, 5.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Librame as a Cake Addin
#addin nuget:?package=Librame&version=5.0.0

// Install Librame as a Cake Tool
#tool nuget:?package=Librame&version=5.0.0

Support ASP.NET MVC 6 + EntityFramework 7 + Kendo UI...

Product Compatible and additional computed target framework versions.
ASP.NET aspnet50 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.5 121 2/19/2015
5.0.4 69 2/17/2015
5.0.3 80 1/29/2015
5.0.2 71 1/29/2015
5.0.1 87 1/19/2015
5.0.0 79 1/18/2015
5.0.0-beta1 76 1/17/2015

Librame 5.0.0 (2015-01-18)
-- 修改 Librame.Data.Models 命名空间下 IdEntity、DataIdEntity 等抽象实体为泛类型(IdEntity'T、DataIdEntity'T),以支持不同 ID 编号类型(如 int、guid...);
-- 增加 Librame.Controllers 命名空间下 ControllerBase'T、ControlerApi'T、ControllerRepository'T 等控制器的实体编号类型,以支持上一条的改动;
-- 其它的一些细节优化;

Example:
1. Models
public class Blog : Librame.Data.Models.IdEntity
{
public string Title { get; set; }
public string Description { get; set; }
public DateTime Pubdate { get; set; }
public Blog()
{
Pubdate = DateTime.Now;
}
}
public class TestDbContext : DbContext
{
protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity<Blog>(b =>
{
b.ForRelational().Table("Blogs");
b.Property(p => p.Id).GenerateValuesOnAdd();
b.Property(p => p.Title).Required().MaxLength(50);
b.Property(p => p.Description);
b.Property(p => p.Pubdate).Required();
b.Key(k => k.Id);
});
}
}
2. Startup.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddEntityFramework(Configuration)
.AddSqlServer()
.AddDbContext<TestDbContext>();
services.AddMvc();
services.AddLibrame();
}
3. Controllers
public class BlogController : Librame.Context.Controllers.ControllerRepository<TestDbContext, Blog>
{
}
4. Request http://localhost/Blog
Response [{Id:1,...}]
5. Request http://localhost/Blog?take=10
Response {rows:[{Id:1,...}],total:100}

QQ Group: 112768263
Email: 312535437@qq.com