mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
## v0.4.12
- 增加 .First()/.FirstAsync() 指定字段查询的重载方法 #26; - 调整 FreeSql.Repository 直接引用 FreeSql.DbContext 内的仓储实现; - 移动 FreeSql.Repository 至 FreeSql.DbContext; - 补充 单独针对 MySql 枚举类型的单元测试;
This commit is contained in:
parent
4686d7e0af
commit
dda9eddbcb
@ -1,214 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using FreeSql;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace dbcontext_01.Controllers
|
|
||||||
{
|
|
||||||
[Route("api/[controller]")]
|
|
||||||
[ApiController]
|
|
||||||
public class ValuesController : ControllerBase
|
|
||||||
{
|
|
||||||
|
|
||||||
IFreeSql _orm;
|
|
||||||
public ValuesController(SongContext songContext,
|
|
||||||
IFreeSql orm1, IFreeSql orm2,
|
|
||||||
IFreeSql<long> orm3
|
|
||||||
) {
|
|
||||||
|
|
||||||
_orm = orm1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET api/values
|
|
||||||
[HttpGet]
|
|
||||||
async public Task<string> Get()
|
|
||||||
{
|
|
||||||
|
|
||||||
long id = 0;
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
var repos2Song = _orm.GetRepository<Song, int>();
|
|
||||||
repos2Song.Where(a => a.Id > 10).ToList();
|
|
||||||
//查询结果,进入 states
|
|
||||||
|
|
||||||
var song = new Song { };
|
|
||||||
repos2Song.Insert(song);
|
|
||||||
id = song.Id;
|
|
||||||
|
|
||||||
var adds = Enumerable.Range(0, 100)
|
|
||||||
.Select(a => new Song { Create_time = DateTime.Now, Is_deleted = false, Title = "xxxx" + a, Url = "url222" })
|
|
||||||
.ToList();
|
|
||||||
//创建一堆无主键值
|
|
||||||
|
|
||||||
repos2Song.Insert(adds);
|
|
||||||
|
|
||||||
for (var a = 0; a < 10; a++)
|
|
||||||
adds[a].Title = "dkdkdkdk" + a;
|
|
||||||
|
|
||||||
repos2Song.Update(adds);
|
|
||||||
//批量修改
|
|
||||||
|
|
||||||
repos2Song.Delete(adds.Skip(10).Take(20).ToList());
|
|
||||||
//批量删除,10-20 元素的主键值会被清除
|
|
||||||
|
|
||||||
adds.Last().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
repos2Song.Update(adds.Last());
|
|
||||||
|
|
||||||
adds.First().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
repos2Song.Update(adds.First());
|
|
||||||
|
|
||||||
|
|
||||||
using (var ctx = new SongContext()) {
|
|
||||||
|
|
||||||
ctx.Songs.Select.Where(a => a.Id > 10).ToList();
|
|
||||||
//查询结果,进入 states
|
|
||||||
|
|
||||||
song = new Song { };
|
|
||||||
//可插入的 song
|
|
||||||
|
|
||||||
ctx.Songs.Add(song);
|
|
||||||
id = song.Id;
|
|
||||||
//因有自增类型,立即开启事务执行SQL,返回自增值
|
|
||||||
|
|
||||||
adds = Enumerable.Range(0, 100)
|
|
||||||
.Select(a => new Song { Create_time = DateTime.Now, Is_deleted = false, Title = "xxxx" + a, Url = "url222" })
|
|
||||||
.ToList();
|
|
||||||
//创建一堆无主键值
|
|
||||||
|
|
||||||
ctx.Songs.AddRange(adds);
|
|
||||||
//立即执行,将自增值赋给 adds 所有元素,因为有自增类型,如果其他类型,指定传入主键值,不会立即执行
|
|
||||||
|
|
||||||
for (var a = 0; a < 10; a++)
|
|
||||||
adds[a].Title = "dkdkdkdk" + a;
|
|
||||||
|
|
||||||
ctx.Songs.UpdateRange(adds);
|
|
||||||
//批量修改,进入队列
|
|
||||||
|
|
||||||
ctx.Songs.RemoveRange(adds.Skip(10).Take(20).ToList());
|
|
||||||
//批量删除,进入队列,完成时 10-20 元素的主键值会被清除
|
|
||||||
|
|
||||||
//ctx.Songs.Update(adds.First());
|
|
||||||
|
|
||||||
adds.Last().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
ctx.Songs.Update(adds.Last());
|
|
||||||
|
|
||||||
adds.First().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
ctx.Songs.Update(adds.First());
|
|
||||||
|
|
||||||
//单条修改 urls 的值,进入队列
|
|
||||||
|
|
||||||
//throw new Exception("回滚");
|
|
||||||
|
|
||||||
//ctx.Songs.Select.First();
|
|
||||||
//这里做一个查询,会立即打包【执行队列】,避免没有提交的数据,影响查询结果
|
|
||||||
|
|
||||||
ctx.SaveChanges();
|
|
||||||
//打包【执行队列】,提交事务
|
|
||||||
}
|
|
||||||
|
|
||||||
using (var uow = _orm.CreateUnitOfWork()) {
|
|
||||||
|
|
||||||
var reposSong = uow.GetRepository<Song, int>();
|
|
||||||
reposSong.Where(a => a.Id > 10).ToList();
|
|
||||||
//查询结果,进入 states
|
|
||||||
|
|
||||||
song = new Song { };
|
|
||||||
reposSong.Insert(song);
|
|
||||||
id = song.Id;
|
|
||||||
|
|
||||||
adds = Enumerable.Range(0, 100)
|
|
||||||
.Select(a => new Song { Create_time = DateTime.Now, Is_deleted = false, Title = "xxxx" + a, Url = "url222" })
|
|
||||||
.ToList();
|
|
||||||
//创建一堆无主键值
|
|
||||||
|
|
||||||
reposSong.Insert(adds);
|
|
||||||
|
|
||||||
for (var a = 0; a < 10; a++)
|
|
||||||
adds[a].Title = "dkdkdkdk" + a;
|
|
||||||
|
|
||||||
reposSong.Update(adds);
|
|
||||||
//批量修改
|
|
||||||
|
|
||||||
reposSong.Delete(adds.Skip(10).Take(20).ToList());
|
|
||||||
//批量删除,10-20 元素的主键值会被清除
|
|
||||||
|
|
||||||
adds.Last().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
reposSong.Update(adds.Last());
|
|
||||||
|
|
||||||
adds.First().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
reposSong.Update(adds.First());
|
|
||||||
|
|
||||||
uow.Commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//using (var ctx = new SongContext()) {
|
|
||||||
|
|
||||||
// var song = new Song { };
|
|
||||||
// await ctx.Songs.AddAsync(song);
|
|
||||||
// id = song.Id;
|
|
||||||
|
|
||||||
// var adds = Enumerable.Range(0, 100)
|
|
||||||
// .Select(a => new Song { Create_time = DateTime.Now, Is_deleted = false, Title = "xxxx" + a, Url = "url222" })
|
|
||||||
// .ToList();
|
|
||||||
// await ctx.Songs.AddRangeAsync(adds);
|
|
||||||
|
|
||||||
// for (var a = 0; a < adds.Count; a++)
|
|
||||||
// adds[a].Title = "dkdkdkdk" + a;
|
|
||||||
|
|
||||||
// ctx.Songs.UpdateRange(adds);
|
|
||||||
|
|
||||||
// ctx.Songs.RemoveRange(adds.Skip(10).Take(20).ToList());
|
|
||||||
|
|
||||||
// //ctx.Songs.Update(adds.First());
|
|
||||||
|
|
||||||
// adds.Last().Url = "skldfjlksdjglkjjcccc";
|
|
||||||
// ctx.Songs.Update(adds.Last());
|
|
||||||
|
|
||||||
// //throw new Exception("回滚");
|
|
||||||
|
|
||||||
// await ctx.SaveChangesAsync();
|
|
||||||
//}
|
|
||||||
} catch {
|
|
||||||
var item = await _orm.Select<Song>().Where(a => a.Id == id).FirstAsync();
|
|
||||||
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
var item22 = await _orm.Select<Song>().Where(a => a.Id == id).FirstAsync();
|
|
||||||
var item33 = await _orm.Select<Song>().Where(a => a.Id > id).ToListAsync();
|
|
||||||
|
|
||||||
return item22.Id.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET api/values/5
|
|
||||||
[HttpGet("{id}")]
|
|
||||||
public ActionResult<string> Get(int id)
|
|
||||||
{
|
|
||||||
return "value";
|
|
||||||
}
|
|
||||||
|
|
||||||
// POST api/values
|
|
||||||
[HttpPost]
|
|
||||||
public void Post([FromBody] string value)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// PUT api/values/5
|
|
||||||
[HttpPut("{id}")]
|
|
||||||
public void Put(int id, [FromBody] string value)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// DELETE api/values/5
|
|
||||||
[HttpDelete("{id}")]
|
|
||||||
public void Delete(int id)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
using FreeSql;
|
|
||||||
using FreeSql.DataAnnotations;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace dbcontext_01 {
|
|
||||||
|
|
||||||
public class SongContext : DbContext {
|
|
||||||
|
|
||||||
public DbSet<Song> Songs { get; set; }
|
|
||||||
public DbSet<Tag> Tags { get; set; }
|
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder builder) {
|
|
||||||
builder.UseFreeSql(dbcontext_01.Startup.Fsql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class Song {
|
|
||||||
[Column(IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public DateTime? Create_time { get; set; }
|
|
||||||
public bool? Is_deleted { get; set; }
|
|
||||||
public string Title { get; set; }
|
|
||||||
public string Url { get; set; }
|
|
||||||
|
|
||||||
public virtual ICollection<Tag> Tags { get; set; }
|
|
||||||
|
|
||||||
[Column(IsVersion = true)]
|
|
||||||
public long versionRow { get; set; }
|
|
||||||
}
|
|
||||||
public class Song_tag {
|
|
||||||
public int Song_id { get; set; }
|
|
||||||
public virtual Song Song { get; set; }
|
|
||||||
|
|
||||||
public int Tag_id { get; set; }
|
|
||||||
public virtual Tag Tag { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Tag {
|
|
||||||
[Column(IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public int? Parent_id { get; set; }
|
|
||||||
public virtual Tag Parent { get; set; }
|
|
||||||
|
|
||||||
public decimal? Ddd { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public virtual ICollection<Song> Songs { get; set; }
|
|
||||||
public virtual ICollection<Tag> Tags { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Numerics;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using FreeSql;
|
|
||||||
using FreeSql.DataAnnotations;
|
|
||||||
using Microsoft.AspNetCore;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace dbcontext_01
|
|
||||||
{
|
|
||||||
public class Program
|
|
||||||
{
|
|
||||||
|
|
||||||
public class Song {
|
|
||||||
[Column(IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string BigNumber { get; set; }
|
|
||||||
|
|
||||||
[Column(IsVersion = true)]//使用简单
|
|
||||||
public long versionRow { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SongContext : DbContext {
|
|
||||||
|
|
||||||
public DbSet<Song> Songs { get; set; }
|
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder builder) {
|
|
||||||
builder.UseFreeSql(fsql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static IFreeSql fsql;
|
|
||||||
public static void Main(string[] args) {
|
|
||||||
fsql = new FreeSql.FreeSqlBuilder()
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=|DataDirectory|\dd2.db;Pooling=true;Max Pool Size=10")
|
|
||||||
.UseAutoSyncStructure(true)
|
|
||||||
.UseLazyLoading(true)
|
|
||||||
.UseNoneCommandParameter(true)
|
|
||||||
|
|
||||||
.UseMonitorCommand(cmd => Trace.WriteLine(cmd.CommandText))
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
using (var ctx = new SongContext()) {
|
|
||||||
var song = new Song { BigNumber = "1000000000000000000" };
|
|
||||||
ctx.Songs.Add(song);
|
|
||||||
|
|
||||||
ctx.Songs.Update(song);
|
|
||||||
|
|
||||||
song.BigNumber = (BigInteger.Parse(song.BigNumber) + 1).ToString();
|
|
||||||
ctx.Songs.Update(song);
|
|
||||||
|
|
||||||
ctx.SaveChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateWebHostBuilder(args).Build().Run();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
||||||
WebHost.CreateDefaultBuilder(args)
|
|
||||||
.UseStartup<Startup>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"iisSettings": {
|
|
||||||
"windowsAuthentication": false,
|
|
||||||
"anonymousAuthentication": true,
|
|
||||||
"iisExpress": {
|
|
||||||
"applicationUrl": "http://localhost:53030/",
|
|
||||||
"sslPort": 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"IIS Express": {
|
|
||||||
"commandName": "IISExpress",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dbcontext_01": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
},
|
|
||||||
"applicationUrl": "http://localhost:53031/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,91 +0,0 @@
|
|||||||
using FreeSql;
|
|
||||||
using FreeSql.DataAnnotations;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Swashbuckle.AspNetCore.Swagger;
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace dbcontext_01
|
|
||||||
{
|
|
||||||
public class Startup
|
|
||||||
{
|
|
||||||
public Startup(IConfiguration configuration, ILoggerFactory loggerFactory)
|
|
||||||
{
|
|
||||||
Configuration = configuration;
|
|
||||||
|
|
||||||
Fsql = new FreeSql.FreeSqlBuilder()
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=|DataDirectory|\document.db;Pooling=true;Max Pool Size=10")
|
|
||||||
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=10")
|
|
||||||
.UseLogger(loggerFactory.CreateLogger<IFreeSql>())
|
|
||||||
.UseAutoSyncStructure(true)
|
|
||||||
.UseLazyLoading(true)
|
|
||||||
.UseNoneCommandParameter(true)
|
|
||||||
|
|
||||||
.UseMonitorCommand(cmd => Trace.WriteLine(cmd.CommandText),
|
|
||||||
(cmd, log) => Trace.WriteLine(log)
|
|
||||||
)
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
Fsql2 = new FreeSql.FreeSqlBuilder()
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=|DataDirectory|\document222.db;Pooling=true;Max Pool Size=10")
|
|
||||||
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=10")
|
|
||||||
.UseLogger(loggerFactory.CreateLogger<IFreeSql>())
|
|
||||||
.UseAutoSyncStructure(true)
|
|
||||||
.UseLazyLoading(true)
|
|
||||||
|
|
||||||
.UseMonitorCommand(cmd => Trace.WriteLine(cmd.CommandText),
|
|
||||||
(cmd, log) => Trace.WriteLine(log)
|
|
||||||
)
|
|
||||||
.Build<long>();
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MySql { }
|
|
||||||
enum PgSql { }
|
|
||||||
|
|
||||||
public IConfiguration Configuration { get; }
|
|
||||||
public static IFreeSql Fsql { get; private set; }
|
|
||||||
public static IFreeSql<long> Fsql2 { get; private set; }
|
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services)
|
|
||||||
{
|
|
||||||
services.AddMvc();
|
|
||||||
services.AddSwaggerGen(options => {
|
|
||||||
options.SwaggerDoc("v1", new Info {
|
|
||||||
Version = "v1",
|
|
||||||
Title = "FreeSql.DbContext API"
|
|
||||||
});
|
|
||||||
//options.IncludeXmlComments(xmlPath);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
services.AddSingleton<IFreeSql>(Fsql);
|
|
||||||
services.AddSingleton<IFreeSql<long>>(Fsql2);
|
|
||||||
services.AddFreeDbContext<SongContext>(options => options.UseFreeSql(Fsql));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
|
|
||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
|
||||||
Console.OutputEncoding = Encoding.GetEncoding("GB2312");
|
|
||||||
Console.InputEncoding = Encoding.GetEncoding("GB2312");
|
|
||||||
|
|
||||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
|
||||||
loggerFactory.AddDebug();
|
|
||||||
|
|
||||||
app.UseHttpMethodOverride(new HttpMethodOverrideOptions { FormFieldName = "X-Http-Method-Override" });
|
|
||||||
app.UseDeveloperExceptionPage();
|
|
||||||
app.UseMvc();
|
|
||||||
|
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI(c => {
|
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "FreeSql.RESTful API V1");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Debug",
|
|
||||||
"System": "Information",
|
|
||||||
"Microsoft": "Information"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
|
||||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="4.0.1" />
|
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\FreeSql.DbContext\FreeSql.DbContext.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,21 +0,0 @@
|
|||||||
using domain_01.Entitys;
|
|
||||||
using FreeSql;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace domain_01.Domains
|
|
||||||
{
|
|
||||||
public class MusicDomain
|
|
||||||
{
|
|
||||||
GuidRepository<Singer> _singerRepostiry => g.orm.GetGuidRepository<Singer>();
|
|
||||||
GuidRepository<Album> _albumRepostiry => g.orm.GetGuidRepository<Album>();
|
|
||||||
GuidRepository<Song> _songRepostiry => g.orm.GetGuidRepository<Song>();
|
|
||||||
GuidRepository<AlbumSong> _albumSongRepostiry => g.orm.GetGuidRepository<AlbumSong>();
|
|
||||||
|
|
||||||
public void SaveSong() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace domain_01.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 专辑
|
|
||||||
/// </summary>
|
|
||||||
public class Album
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public virtual ICollection<Song> Songs { get; set; }
|
|
||||||
|
|
||||||
public DateTime PublishTime { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
using FreeSql.DataAnnotations;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace domain_01.Entitys {
|
|
||||||
public class AlbumSong {
|
|
||||||
|
|
||||||
public Guid AlbumId { get; set; }
|
|
||||||
|
|
||||||
public Guid SongId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace domain_01.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 歌手
|
|
||||||
/// </summary>
|
|
||||||
public class Singer
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
public string Nickname { get; set; }
|
|
||||||
|
|
||||||
public DateTime RegTime { get; set; } = DateTime.Now;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
using FreeSql.DataAnnotations;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace domain_01.Entitys {
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 歌曲
|
|
||||||
/// </summary>
|
|
||||||
public class Song {
|
|
||||||
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
public Guid SingerId { get; set; }
|
|
||||||
public virtual Guid Singer { get; set; }
|
|
||||||
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public string Url { get; set; }
|
|
||||||
|
|
||||||
public virtual ICollection<Album> Albums { get; set; }
|
|
||||||
|
|
||||||
public DateTime RegTime { get; set; } = DateTime.Now;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace domain_01 {
|
|
||||||
public class Program
|
|
||||||
{
|
|
||||||
public static void Main(string[] args)
|
|
||||||
{
|
|
||||||
CreateWebHostBuilder(args).Build().Run();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
||||||
WebHost.CreateDefaultBuilder(args)
|
|
||||||
.UseStartup<Startup>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"iisSettings": {
|
|
||||||
"windowsAuthentication": false,
|
|
||||||
"anonymousAuthentication": true,
|
|
||||||
"iisExpress": {
|
|
||||||
"applicationUrl": "http://localhost:54379/",
|
|
||||||
"sslPort": 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"IIS Express": {
|
|
||||||
"commandName": "IISExpress",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repository_01": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
},
|
|
||||||
"applicationUrl": "http://localhost:54383/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,60 +0,0 @@
|
|||||||
using FreeSql;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Swashbuckle.AspNetCore.Swagger;
|
|
||||||
using System;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace domain_01 {
|
|
||||||
public class Startup {
|
|
||||||
public Startup(IConfiguration configuration, ILoggerFactory loggerFactory) {
|
|
||||||
Configuration = configuration;
|
|
||||||
|
|
||||||
g.orm = new FreeSql.FreeSqlBuilder()
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=|DataDirectory|\document.db;Pooling=true;Max Pool Size=10")
|
|
||||||
.UseLogger(loggerFactory.CreateLogger<IFreeSql>())
|
|
||||||
.UseAutoSyncStructure(true)
|
|
||||||
.Build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IConfiguration Configuration { get; }
|
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services) {
|
|
||||||
services.AddSingleton<IFreeSql>(g.orm);
|
|
||||||
|
|
||||||
services.AddMvc();
|
|
||||||
services.AddSwaggerGen(options => {
|
|
||||||
options.SwaggerDoc("v1", new Info {
|
|
||||||
Version = "v1",
|
|
||||||
Title = "FreeSql.domain_01 API"
|
|
||||||
});
|
|
||||||
//options.IncludeXmlComments(xmlPath);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
|
|
||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
|
||||||
Console.OutputEncoding = Encoding.GetEncoding("GB2312");
|
|
||||||
Console.InputEncoding = Encoding.GetEncoding("GB2312");
|
|
||||||
|
|
||||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
|
||||||
loggerFactory.AddDebug();
|
|
||||||
|
|
||||||
app.UseHttpMethodOverride(new HttpMethodOverrideOptions { FormFieldName = "X-Http-Method-Override" });
|
|
||||||
app.UseDeveloperExceptionPage();
|
|
||||||
app.UseMvc();
|
|
||||||
|
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI(c => {
|
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "FreeSql.domain_01 API V1");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class g {
|
|
||||||
public static IFreeSql orm { get; set; }
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Debug",
|
|
||||||
"System": "Information",
|
|
||||||
"Microsoft": "Information"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
|
||||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="4.0.1" />
|
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\FreeSql.Repository\FreeSql.Repository.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Properties\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="readmeDetail.xaml.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="readmeMaster.xaml.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="readmeMenuItem.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,5 +0,0 @@
|
|||||||
## 示例项目 domain_01
|
|
||||||
|
|
||||||
实体:Entitys
|
|
||||||
|
|
||||||
领域:Domains
|
|
@ -1,70 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
|
||||||
</startup>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.Loader" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
@ -1,43 +0,0 @@
|
|||||||
using FreeSql.DataAnnotations;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace net46_console_01 {
|
|
||||||
class Program {
|
|
||||||
static void Main(string[] args) {
|
|
||||||
|
|
||||||
var orm = new FreeSql.FreeSqlBuilder()
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=|DataDirectory|\document.db;Pooling=true;Max Pool Size=10")
|
|
||||||
//.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;Max pool size=10")
|
|
||||||
.UseAutoSyncStructure(true)
|
|
||||||
.UseConfigEntityFromDbFirst(true)
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
var repos = orm.GetGuidRepository<Song22>();
|
|
||||||
|
|
||||||
var item = repos.Insert(new Song22());
|
|
||||||
Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(item));
|
|
||||||
|
|
||||||
item.Title = "xxx";
|
|
||||||
repos.Update(item);
|
|
||||||
Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(item));
|
|
||||||
|
|
||||||
Console.WriteLine(repos.UpdateDiy.Where(a => a.Id == item.Id).Set(a => a.Clicks + 1).ToSql());
|
|
||||||
repos.UpdateDiy.Where(a => a.Id == item.Id).Set(a => a.Clicks + 1).ExecuteAffrows();
|
|
||||||
|
|
||||||
item = repos.Find(item.Id);
|
|
||||||
Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(item));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Song22 {
|
|
||||||
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Title { get; set; }
|
|
||||||
|
|
||||||
public int Clicks { get; set; } = 10;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// 有关程序集的一般信息由以下
|
|
||||||
// 控制。更改这些特性值可修改
|
|
||||||
// 与程序集关联的信息。
|
|
||||||
[assembly: AssemblyTitle("net46_console_01")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("net46_console_01")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|
||||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|
||||||
//请将此类型的 ComVisible 特性设置为 true。
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|
||||||
[assembly: Guid("0637a778-338e-4096-b439-32b18306c75f")]
|
|
||||||
|
|
||||||
// 程序集的版本信息由下列四个值组成:
|
|
||||||
//
|
|
||||||
// 主版本
|
|
||||||
// 次版本
|
|
||||||
// 生成号
|
|
||||||
// 修订号
|
|
||||||
//
|
|
||||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|
||||||
// 方法是按如下所示使用“*”: :
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,284 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{0637A778-338E-4096-B439-32B18306C75F}</ProjectGuid>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<RootNamespace>net46_console_01</RootNamespace>
|
|
||||||
<AssemblyName>net46_console_01</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
|
||||||
<Deterministic>true</Deterministic>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="CSScriptLib, Version=1.0.6.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\CS-Script.Core.1.0.6\lib\netstandard2.0\CSScriptLib.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Common.2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CodeAnalysis.CSharp.Scripting, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.Scripting.2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Scripting.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CodeAnalysis.Scripting, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Scripting.Common.2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.Scripting.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.DotNet.PlatformAbstractions.2.1.0\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Caching.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Caching.Abstractions.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Caching.Memory, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Caching.Memory.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Configuration, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Abstractions.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Binder.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.DependencyModel, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.DependencyModel.2.1.0\lib\net451\Microsoft.Extensions.DependencyModel.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Logging, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Logging.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Debug, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Debug.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Debug.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Options, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Options.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Primitives, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="MySql.Data, Version=8.0.15.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\MySql.Data.8.0.15\lib\net452\MySql.Data.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Npgsql, Version=4.0.5.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Npgsql.4.0.5\lib\net451\Npgsql.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Npgsql.LegacyPostgis, Version=4.0.5.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Npgsql.LegacyPostgis.4.0.5\lib\net45\Npgsql.LegacyPostgis.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Oracle.ManagedDataAccess, Version=2.0.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\Oracle.ManagedDataAccess.Core.2.18.3\lib\netstandard2.0\Oracle.ManagedDataAccess.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SafeObjectPool, Version=1.0.14.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\SafeObjectPool.1.0.14\lib\netstandard2.0\SafeObjectPool.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
|
||||||
<Reference Include="System.Configuration" />
|
|
||||||
<Reference Include="System.Configuration.Install" />
|
|
||||||
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Data.SqlClient, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Data.SqlClient.4.6.0\lib\net461\System.Data.SqlClient.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.110.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Data.SQLite.Core.1.0.110.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Diagnostics.FileVersionInfo, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Diagnostics.FileVersionInfo.4.3.0\lib\net46\System.Diagnostics.FileVersionInfo.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Diagnostics.StackTrace, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Drawing.Design" />
|
|
||||||
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Management" />
|
|
||||||
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.2\lib\netstandard2.0\System.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Numerics" />
|
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.Loader, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Runtime.Loader.4.3.0\lib\netstandard1.5\System.Runtime.Loader.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Transactions" />
|
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.XPath, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Xml.XPath.4.3.0\lib\net46\System.Xml.XPath.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="App.config" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.2.6.1\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
|
||||||
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.2.6.1\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\FreeSql.Repository\FreeSql.Repository.csproj">
|
|
||||||
<Project>{ac47670e-90bb-4502-9965-0739bdf6fe2e}</Project>
|
|
||||||
<Name>FreeSql.Repository</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\FreeSql\FreeSql.csproj">
|
|
||||||
<Project>{af9c50ec-6eb6-494b-9b3b-7edba6fd0ebb}</Project>
|
|
||||||
<Name>FreeSql</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<Import Project="..\..\packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets'))" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
|
@ -1,84 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="CS-Script.Core" version="1.0.6" targetFramework="net461" />
|
|
||||||
<package id="FreeSql" version="0.1.11" targetFramework="net461" />
|
|
||||||
<package id="FreeSql.Repository" version="0.1.11" targetFramework="net461" />
|
|
||||||
<package id="Google.Protobuf" version="3.5.1" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="2.6.1" targetFramework="net461" developmentDependency="true" />
|
|
||||||
<package id="Microsoft.CodeAnalysis.Common" version="2.10.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.CodeAnalysis.CSharp" version="2.10.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.CodeAnalysis.CSharp.Scripting" version="2.10.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.CodeAnalysis.Scripting.Common" version="2.10.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.DotNet.PlatformAbstractions" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Caching.Abstractions" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Caching.Memory" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Configuration" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Configuration.Binder" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.DependencyModel" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Logging" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Logging.Debug" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Options" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="Microsoft.Extensions.Primitives" version="2.1.0" targetFramework="net461" />
|
|
||||||
<package id="MySql.Data" version="8.0.15" targetFramework="net461" />
|
|
||||||
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" />
|
|
||||||
<package id="Npgsql" version="4.0.5" targetFramework="net461" />
|
|
||||||
<package id="Npgsql.LegacyPostgis" version="4.0.5" targetFramework="net461" />
|
|
||||||
<package id="Oracle.ManagedDataAccess.Core" version="2.18.3" targetFramework="net461" />
|
|
||||||
<package id="SafeObjectPool" version="1.0.14" targetFramework="net461" />
|
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Buffers" version="4.4.0" targetFramework="net461" />
|
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
|
||||||
<package id="System.Console" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SqlClient" version="4.6.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.Core" version="1.0.110.0" targetFramework="net461" />
|
|
||||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Globalization" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.IO" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Linq" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Memory" version="4.5.2" targetFramework="net461" />
|
|
||||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net461" />
|
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
|
|
||||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.0.0" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime.Loader" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Text.Encoding.CodePages" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Threading" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net461" />
|
|
||||||
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
|
||||||
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Xml.XPath" version="4.3.0" targetFramework="net461" />
|
|
||||||
<package id="System.Xml.XPath.XDocument" version="4.3.0" targetFramework="net461" />
|
|
||||||
</packages>
|
|
@ -1,98 +0,0 @@
|
|||||||
using FreeSql;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using restful.Entitys;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace restful.Controllers {
|
|
||||||
|
|
||||||
public class SongRepository : GuidRepository<Song> {
|
|
||||||
public SongRepository(IFreeSql fsql) : base(fsql) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Route("restapi/[controller]")]
|
|
||||||
public class SongsController : Controller {
|
|
||||||
|
|
||||||
BaseRepository<Song, int> _songRepository;
|
|
||||||
|
|
||||||
public class xxxx {
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
public bool IsDeleted { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public SongsController(IFreeSql fsql,
|
|
||||||
GuidRepository<Song> repos1,
|
|
||||||
GuidRepository<xxxx> repos2,
|
|
||||||
|
|
||||||
DefaultRepository<Song, int> repos11,
|
|
||||||
DefaultRepository<xxxx, int> repos21,
|
|
||||||
|
|
||||||
BaseRepository<Song> repos3, BaseRepository<Song, int> repos4,
|
|
||||||
IBasicRepository<Song> repos31, IBasicRepository<Song, int> repos41,
|
|
||||||
IReadOnlyRepository<Song> repos311, IReadOnlyRepository<Song, int> repos411,
|
|
||||||
|
|
||||||
SongRepository reposSong
|
|
||||||
) {
|
|
||||||
_songRepository = repos4;
|
|
||||||
|
|
||||||
//test code
|
|
||||||
var curd1 = fsql.GetRepository<Song, int>();
|
|
||||||
var curd2 = fsql.GetRepository<Song, string>();
|
|
||||||
var curd3 = fsql.GetRepository<Song, Guid>();
|
|
||||||
var curd4 = fsql.GetGuidRepository<Song>();
|
|
||||||
|
|
||||||
Console.WriteLine(repos1.Select.ToSql());
|
|
||||||
Console.WriteLine(reposSong.Select.ToSql());
|
|
||||||
|
|
||||||
Console.WriteLine(repos2.Select.ToSql());
|
|
||||||
Console.WriteLine(repos21.Select.ToSql());
|
|
||||||
|
|
||||||
using (reposSong.DataFilter.DisableAll()) {
|
|
||||||
Console.WriteLine(reposSong.Select.ToSql());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
public Task<List<Song>> GetItems([FromQuery] string key, [FromQuery] int page = 1, [FromQuery] int limit = 20) {
|
|
||||||
return _songRepository.Select.WhereIf(!string.IsNullOrEmpty(key), a => a.Title.Contains(key)).Page(page, limit).ToListAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet("{id}")]
|
|
||||||
public Task<Song> GetItem([FromRoute] int id) {
|
|
||||||
return _songRepository.FindAsync(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ModelSong {
|
|
||||||
public string title { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost, ProducesResponseType(201)]
|
|
||||||
public Task<Song> Create([FromBody] ModelSong model) {
|
|
||||||
return _songRepository.InsertAsync(new Song { Title = model.title });
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPut("{id}")]
|
|
||||||
public Task Update([FromRoute] int id, [FromBody] ModelSong model) {
|
|
||||||
return _songRepository.UpdateAsync(new Song { Id = id, Title = model.title });
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPatch("{id}")]
|
|
||||||
async public Task<Song> UpdateDiy([FromRoute] int id, [FromForm] string title) {
|
|
||||||
var up = _songRepository.UpdateDiy.Where(a => a.Id == id);
|
|
||||||
if (!string.IsNullOrEmpty(title)) up.Set(a => a.Title, title);
|
|
||||||
var ret = await up.ExecuteUpdatedAsync();
|
|
||||||
return ret.FirstOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpDelete("{id}"), ProducesResponseType(204)]
|
|
||||||
public Task Delete([FromRoute] int id) {
|
|
||||||
return _songRepository.DeleteAsync(a => a.Id == id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
using FreeSql.DataAnnotations;
|
|
||||||
using repository_01;
|
|
||||||
|
|
||||||
namespace restful.Entitys {
|
|
||||||
public class Song {
|
|
||||||
|
|
||||||
[Column(IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string Title { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace repository_01
|
|
||||||
{
|
|
||||||
public class Program
|
|
||||||
{
|
|
||||||
public static void Main(string[] args)
|
|
||||||
{
|
|
||||||
CreateWebHostBuilder(args).Build().Run();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
||||||
WebHost.CreateDefaultBuilder(args)
|
|
||||||
.UseStartup<Startup>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"iisSettings": {
|
|
||||||
"windowsAuthentication": false,
|
|
||||||
"anonymousAuthentication": true,
|
|
||||||
"iisExpress": {
|
|
||||||
"applicationUrl": "http://localhost:52751/",
|
|
||||||
"sslPort": 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"IIS Express": {
|
|
||||||
"commandName": "IISExpress",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repository_01": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
},
|
|
||||||
"applicationUrl": "http://localhost:52752/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,116 +0,0 @@
|
|||||||
using Autofac;
|
|
||||||
using Autofac.Extensions.DependencyInjection;
|
|
||||||
using FreeSql;
|
|
||||||
using FreeSql.DataAnnotations;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using restful.Entitys;
|
|
||||||
using Swashbuckle.AspNetCore.Swagger;
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace repository_01 {
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用户密码信息
|
|
||||||
/// </summary>
|
|
||||||
public class Sys1UserLogOn {
|
|
||||||
[Column(IsPrimary = true, Name = "Id")]
|
|
||||||
public Guid UserLogOnId { get; set; }
|
|
||||||
public virtual Sys1User User { get; set; }
|
|
||||||
}
|
|
||||||
public class Sys1User {
|
|
||||||
[Column(IsPrimary = true, Name = "Id")]
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public virtual Sys1UserLogOn UserLogOn { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Startup {
|
|
||||||
public Startup(IConfiguration configuration, ILoggerFactory loggerFactory) {
|
|
||||||
Configuration = configuration;
|
|
||||||
|
|
||||||
Fsql = new FreeSql.FreeSqlBuilder()
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=|DataDirectory|\document.db;Pooling=true;Max Pool Size=10")
|
|
||||||
.UseLogger(loggerFactory.CreateLogger<IFreeSql>())
|
|
||||||
.UseAutoSyncStructure(true)
|
|
||||||
.UseLazyLoading(true)
|
|
||||||
|
|
||||||
.UseMonitorCommand(cmd => Trace.WriteLine(cmd.CommandText))
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
var sysu = new Sys1User { };
|
|
||||||
Fsql.Insert<Sys1User>().AppendData(sysu).ExecuteAffrows();
|
|
||||||
Fsql.Insert<Sys1UserLogOn>().AppendData(new Sys1UserLogOn { UserLogOnId = sysu.UserId }).ExecuteAffrows();
|
|
||||||
var a = Fsql.Select<Sys1UserLogOn>().ToList();
|
|
||||||
var b = Fsql.Select<Sys1UserLogOn>().Any();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IConfiguration Configuration { get; }
|
|
||||||
public static IFreeSql Fsql { get; private set; }
|
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services) {
|
|
||||||
|
|
||||||
//services.AddTransient(s => s.)
|
|
||||||
|
|
||||||
services.AddMvc();
|
|
||||||
services.AddSwaggerGen(options => {
|
|
||||||
options.SwaggerDoc("v1", new Info {
|
|
||||||
Version = "v1",
|
|
||||||
Title = "FreeSql.RESTful API"
|
|
||||||
});
|
|
||||||
//options.IncludeXmlComments(xmlPath);
|
|
||||||
});
|
|
||||||
|
|
||||||
services.AddSingleton<IFreeSql>(Fsql);
|
|
||||||
|
|
||||||
services.AddFreeRepository(filter => filter
|
|
||||||
//.Apply<Song>("test", a => a.Title == DateTime.Now.ToString() + System.Threading.Thread.CurrentThread.ManagedThreadId)
|
|
||||||
.Apply<ISoftDelete>("softdelete", a => a.IsDeleted == false)
|
|
||||||
,
|
|
||||||
this.GetType().Assembly
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//var builder = new ContainerBuilder();
|
|
||||||
|
|
||||||
//builder.RegisterFreeRepository(filter => filter
|
|
||||||
// //.Apply<Song>("test", a => a.Title == DateTime.Now.ToString() + System.Threading.Thread.CurrentThread.ManagedThreadId)
|
|
||||||
// .Apply<ISoftDelete>("softdelete", a => a.IsDeleted == false)
|
|
||||||
// ,
|
|
||||||
// this.GetType().Assembly
|
|
||||||
//);
|
|
||||||
|
|
||||||
//builder.Populate(services);
|
|
||||||
//var container = builder.Build();
|
|
||||||
|
|
||||||
//return new AutofacServiceProvider(container);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
|
|
||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
|
||||||
Console.OutputEncoding = Encoding.GetEncoding("GB2312");
|
|
||||||
Console.InputEncoding = Encoding.GetEncoding("GB2312");
|
|
||||||
|
|
||||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
|
||||||
loggerFactory.AddDebug();
|
|
||||||
|
|
||||||
app.UseHttpMethodOverride(new HttpMethodOverrideOptions { FormFieldName = "X-Http-Method-Override" });
|
|
||||||
app.UseDeveloperExceptionPage();
|
|
||||||
app.UseMvc();
|
|
||||||
|
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI(c => {
|
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "FreeSql.RESTful API V1");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ISoftDelete {
|
|
||||||
bool IsDeleted { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Debug",
|
|
||||||
"System": "Warning",
|
|
||||||
"Microsoft": "Warning"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
|
||||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="4.0.1" />
|
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\FreeSql.Repository\FreeSql.Repository.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,17 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
|
||||||
<Version>0.4.11</Version>
|
|
||||||
<Authors>YeXiangQin</Authors>
|
|
||||||
<Description>FreeSql Implementation of General Repository, Support MySql/SqlServer/PostgreSQL/Oracle/Sqlite, and read/write separation、and split table.</Description>
|
|
||||||
<PackageProjectUrl>https://github.com/2881099/FreeSql/wiki/Repository</PackageProjectUrl>
|
|
||||||
<PackageTags>FreeSql ORM Repository</PackageTags>
|
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="FreeSql.DbContext" Version="0.4.10" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -7,13 +7,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="FreeSql.Repository" Version="0.4.11" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.0" />
|
<PackageReference Include="xunit" Version="2.4.0" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\FreeSql.Repository\FreeSql.Repository.csproj" />
|
|
||||||
<ProjectReference Include="..\FreeSql\FreeSql.csproj" />
|
<ProjectReference Include="..\FreeSql\FreeSql.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
59
FreeSql.sln
59
FreeSql.sln
@ -22,14 +22,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "restful", "Examples\restful
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "efcore_to_freesql", "Examples\efcore_to_freesql\efcore_to_freesql.csproj", "{B93981B8-3295-4EDD-B314-BCA77B6BF37A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "efcore_to_freesql", "Examples\efcore_to_freesql\efcore_to_freesql.csproj", "{B93981B8-3295-4EDD-B314-BCA77B6BF37A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSql.Repository", "FreeSql.Repository\FreeSql.Repository.csproj", "{AC47670E-90BB-4502-9965-0739BDF6FE2E}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "repository_01", "Examples\repository_01\repository_01.csproj", "{C9940A46-D265-4088-9561-5A42ACEDA7AE}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "domain_01", "Examples\domain_01\domain_01.csproj", "{A23D0455-CA7B-442D-827E-C4C7E84F9084}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net461_console_01", "Examples\net461_console_01\net461_console_01.csproj", "{0637A778-338E-4096-B439-32B18306C75F}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "orm_vs", "Examples\orm_vs\orm_vs.csproj", "{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "orm_vs", "Examples\orm_vs\orm_vs.csproj", "{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
@ -114,54 +106,6 @@ Global
|
|||||||
{B93981B8-3295-4EDD-B314-BCA77B6BF37A}.Release|x64.Build.0 = Release|Any CPU
|
{B93981B8-3295-4EDD-B314-BCA77B6BF37A}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{B93981B8-3295-4EDD-B314-BCA77B6BF37A}.Release|x86.ActiveCfg = Release|Any CPU
|
{B93981B8-3295-4EDD-B314-BCA77B6BF37A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{B93981B8-3295-4EDD-B314-BCA77B6BF37A}.Release|x86.Build.0 = Release|Any CPU
|
{B93981B8-3295-4EDD-B314-BCA77B6BF37A}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{AC47670E-90BB-4502-9965-0739BDF6FE2E}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@ -181,9 +125,6 @@ Global
|
|||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{83D10565-AF9D-4EDC-8FB8-8C962A843F97} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
{83D10565-AF9D-4EDC-8FB8-8C962A843F97} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
||||||
{B93981B8-3295-4EDD-B314-BCA77B6BF37A} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
{B93981B8-3295-4EDD-B314-BCA77B6BF37A} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
||||||
{C9940A46-D265-4088-9561-5A42ACEDA7AE} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
|
||||||
{A23D0455-CA7B-442D-827E-C4C7E84F9084} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
|
||||||
{0637A778-338E-4096-B439-32B18306C75F} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
|
||||||
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
{1A5EC2EB-8C2B-4547-8AC6-EB5C0DE0CA81} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<Version>0.4.11</Version>
|
<Version>0.4.12</Version>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
<Authors>YeXiangQin</Authors>
|
<Authors>YeXiangQin</Authors>
|
||||||
<Description>FreeSql is the most convenient ORM in dotnet. It supports Mysql, Postgresql, SqlServer, Oracle and Sqlite.</Description>
|
<Description>FreeSql is the most convenient ORM in dotnet. It supports Mysql, Postgresql, SqlServer, Oracle and Sqlite.</Description>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user