mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
|
||||
<Version>2.3.105</Version>
|
||||
<Version>2.3.106</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>FreeSql;ncc;YeXiangQin</Authors>
|
||||
<Description>FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Firebird, Odbc, 达梦, 人大金仓, 神舟通用, 翰高, And Access</Description>
|
||||
|
@ -2732,7 +2732,7 @@
|
||||
注意:实体必须定义主键,并且最终会自动附加条件 where id in (source.Id)
|
||||
</summary>
|
||||
<param name="source">实体集合</param>
|
||||
<param name="primarys">根据主键更新,a => a.Name | a => new{a.Name,a.Time} | a => new[]{"name","time"}</param>
|
||||
<param name="tempPrimarys">根据临时主键更新,a => a.Name | a => new{a.Name,a.Time} | a => new[]{"name","time"}</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IUpdate`1.SetSourceIgnore(`0,System.Func{System.Object,System.Boolean})">
|
||||
|
@ -72,9 +72,9 @@ namespace FreeSql
|
||||
/// 注意:实体必须定义主键,并且最终会自动附加条件 where id in (source.Id)
|
||||
/// </summary>
|
||||
/// <param name="source">实体集合</param>
|
||||
/// <param name="primarys">根据主键更新,a => a.Name | a => new{a.Name,a.Time} | a => new[]{"name","time"}</param>
|
||||
/// <param name="tempPrimarys">根据临时主键更新,a => a.Name | a => new{a.Name,a.Time} | a => new[]{"name","time"}</param>
|
||||
/// <returns></returns>
|
||||
IUpdate<T1> SetSource(IEnumerable<T1> source, Expression<Func<T1, object>> primarys = null);
|
||||
IUpdate<T1> SetSource(IEnumerable<T1> source, Expression<Func<T1, object>> tempPrimarys = null);
|
||||
/// <summary>
|
||||
/// 更新数据,设置更新的实体,同时设置忽略的列<para></para>
|
||||
/// 忽略 null 属性:fsql.Update<T>().SetSourceAndIgnore(item, colval => colval == null)<para></para>
|
||||
|
@ -669,6 +669,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
if (entityType == _table.Type) return this;
|
||||
var newtb = _commonUtils.GetTableByEntity(entityType);
|
||||
_table = newtb ?? throw new Exception("IUpdate.AsType 参数错误,请传入正确的实体类型");
|
||||
_tempPrimarys = _table.Primarys;
|
||||
if (_orm.CodeFirst.IsAutoSyncStructure) _orm.CodeFirst.SyncStructure(entityType);
|
||||
IgnoreCanUpdate();
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user