Closed DaqingFeng closed 7 years ago
sorry for the late response. which part of dal are you talking about? the client code or the genrated code?
@hejiehui The code in the client code . please see the detail
namespace Arch.Data.Orm.partially
{
/// <summary>
///
/// </summary>
/// <typeparam name="T">Indicates table entity</typeparam>
class ExpressionHelper<T>
{
........
public static String GetFieldName<TField>(Expression<Func<T, TField>> setValue)
{
if (setValue == null || setValue.Parameters == null || setValue.Parameters.Count == 0)
throw new DalException("Lambda expression is invalid.");
var parameter = setValue.Parameters[0];
if (parameter == null)
throw new DalException("Lambda expression[{0}] is invalid.", setValue.ToString());
var member = GetMemberExpression(setValue); // I extend this func to the logic .
Thanks
你可以使用字符串的方式指定coulmn name,如果使用ExpressionHelper,你可以自己修改一下源码,开源版.Net DAL除非遇到重大问题,一般不会再更新了。
Need Replace the
to
The extend func