优化 FreeSql.Repository 使用方法

This commit is contained in:
28810
2019-02-28 20:38:26 +08:00
parent f034d4194d
commit 8e4d3c03a5
9 changed files with 74 additions and 13 deletions

View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using repository_01.Repositorys;
using restful.Entitys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@ -15,6 +16,12 @@ namespace restful.Controllers {
public SongsController(IFreeSql fsql) {
_songRepository = new SongRepository(fsql);
//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>();
}
[HttpGet]