- 增加 [Description] 元数据注释,优先级低于 c# 代码注释;

This commit is contained in:
28810
2020-05-07 11:00:55 +08:00
parent ae11f552fa
commit 60bb29b19f
8 changed files with 88 additions and 2 deletions

View File

@ -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; }
}