Skip to content

Commit

Permalink
重载ToColumns扩展方法;
Browse files Browse the repository at this point in the history
  • Loading branch information
zqlovejyc committed Jul 10, 2021
1 parent eaf2109 commit 075228c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SQLBuilder.Core/Extensions/ObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Newtonsoft.Json.Serialization;
using SQLBuilder.Core.Attributes;
using SQLBuilder.Core.Enums;
using SQLBuilder.Core.Repositories;
using System;
using System.ComponentModel;
using System.Reflection;
Expand Down Expand Up @@ -245,6 +246,17 @@ public static T To<T>(this object @this)
#endregion

#region ToColumns
/// <summary>
/// 根据实体类型获取所有列的查询字符串
/// </summary>
/// <param name="this">实体Type类型</param>
/// <param name="repository">仓储</param>
/// <returns></returns>
public static string ToColumns(this Type @this, IRepository repository)
{
return @this.ToColumns(repository.IsEnableFormat, repository.DatabaseType);
}

/// <summary>
/// 根据实体类型获取所有列的查询字符串
/// </summary>
Expand Down

0 comments on commit 075228c

Please sign in to comment.