mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 增加 [Description] 元数据注释,优先级低于 c# 代码注释;
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace aspnetcore_transaction.Controllers
|
||||
@ -45,6 +46,7 @@ namespace aspnetcore_transaction.Controllers
|
||||
|
||||
public SongService(BaseRepository<Song> repoSong, BaseRepository<Detail> repoDetail, SongRepository repoSong2)
|
||||
{
|
||||
var tb = repoSong.Orm.CodeFirst.GetTableByEntity(typeof(Song));
|
||||
_repoSong = repoSong;
|
||||
_repoDetail = repoDetail;
|
||||
_repoSong2 = repoSong2;
|
||||
@ -81,9 +83,14 @@ namespace aspnetcore_transaction.Controllers
|
||||
public SongRepository(UnitOfWorkManager uowm) : base(uowm?.Orm, uowm) { }
|
||||
}
|
||||
|
||||
[Description("123")]
|
||||
public class Song
|
||||
{
|
||||
/// <summary>
|
||||
/// 自增
|
||||
/// </summary>
|
||||
[Column(IsIdentity = true)]
|
||||
[Description("自增id")]
|
||||
public int Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
|
@ -4,6 +4,10 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DocumentationFile>aspnetcore_transaction.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FreeSql.DynamicProxy" Version="1.3.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
|
||||
|
18
Examples/aspnetcore_transaction/aspnetcore_transaction.xml
Normal file
18
Examples/aspnetcore_transaction/aspnetcore_transaction.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>aspnetcore_transaction</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:aspnetcore_transaction.Controllers.Song.Id">
|
||||
<summary>
|
||||
自增
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:FreeSql.TransactionalAttribute">
|
||||
<summary>
|
||||
使用事务执行,请查看 Program.cs 代码开启动态代理
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Reference in New Issue
Block a user