Librame 5.0.2
See the version list below for details.
dotnet add package Librame --version 5.0.2
NuGet\Install-Package Librame -Version 5.0.2
<PackageReference Include="Librame" Version="5.0.2" />
paket add Librame --version 5.0.2
#r "nuget: Librame, 5.0.2"
// Install Librame as a Cake Addin
#addin nuget:?package=Librame&version=5.0.2
// Install Librame as a Cake Tool
#tool nuget:?package=Librame&version=5.0.2
Support ASP.NET MVC 6 + EntityFramework 7 + Kendo UI...
Product | Versions Compatible and additional computed target framework versions. |
---|---|
ASP.NET | aspnet50 is compatible. |
-
ASP.NET 5.0
- EntityFramework.SqlServer (>= 7.0.0-rc1-11854)
- Microsoft.AspNet.Mvc (>= 6.0.0-rc1-12214)
- Microsoft.Framework.ConfigurationModel.Json (>= 1.0.0-rc1-10645)
- Microsoft.Framework.DependencyInjection (>= 1.0.0-rc1-10675)
- Newtonsoft.Json (>= 6.0.8)
GitHub repositories
This package is not used by any popular GitHub repositories.
Librame 5.0.2 (2015-01-29)
-- 增加 ServiceMapper、ApplicationBinder 功能,分别用于管理 IServiceCollection、IApplicationBuilder 功能;同时 ApplicationBinder 自身是 Librame 级基础容器;
-- 增加 Librame.Security 安全命名空间,支持哈希算法(MD5, SHA1, SHA256, SHA384, SHA512...)、键控哈希算法(HMACMD5, HMACSHA1, HMACSHA256, HMACSHA384, HMACSHA512, HMACTripleDES...)、对称算法(AES, DES, TripleDES)等大量算法功能;
-- 优化 Librame.Context 命名空间下 QueryInterceptor 等相关功能;
-- 调整 Librame.Context 命名空间下 ContextRepository'T3,为其 CRUD 方法增加 HttpMethodAttribute 属性,同时修正了继续此类会出现找不到路径等相关异常;
-- 修正 Librame.Data 命名空间下数据查询的相关 BUG;
-- 其它的一些细节优化;
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