当我们仅将它们用于读取和选择时,为什么Lightswitch会进行相关实体更新 [英] Why Lightswitch do related entities updates when we use them only for read and select
问题描述
今天,我使用Sql事件探查器,并注意到lightswitch进行了一些更新.
Today I use Sql profiler and notice that lightswitch do some updates.
例如,如果我们创建新的注册并选择与该注册相关的候选人
For example if we create new enrollment and select candidate (which is related to that enrollment)
插入注册时,我捕获了此查询:
when inserting enrollment I capture this query:
更新[dbo].[候选人]
设置@p = 0
其中((((((((((((((((([[[Id] = @ 0)和([[FirstName] = @ 1))和([LastName] = @ 2))和([性别] = @ 3))和([[IdentificationNumber] = @ 4))...
update [dbo].[Candidates]
set @p = 0
where (((((((((((((((((([Id] = @0) and ([FirstName] = @1)) and ([LastName] = @2)) and ([Gender] = @3)) and ([IdentificationNumber] = @4)) ...
这是常规的LS行为还是我的错误:) ??
Is this regular LS behaviour or my bug :) ??
推荐答案
ping
这篇关于当我们仅将它们用于读取和选择时,为什么Lightswitch会进行相关实体更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!