c# - RIA EntityQuery duplicating rows where one of the values matches -


In my application I work as an entity, if I use SQL Profiler, it catches the SQL query which Is generated, and runs it manually, this result I expect. For example

  Val Date 68 2011-05-31 00: 00: 00.000 48 2011-05-30 00: 00: 00.000 92 2011-05-29 00: 00: 00.000 52 2011 - 05-28 00: 00: 00.000 32 2011-05-27 00: 00: 00.000 32 2011-05-26 00: 00: 00.000 52 2011-05-25 00: 00: 00.000 81 2011-05-24 00: 00: 00.000   

If I touch a breakpoint in my code and see if load operation. Determination, then I know that when the 'Wall' figure for entry already appears (Up to IE 52), then load operation. The data collection uses data from the previous entry (actual value Instead of somewhere with a value of 52). So in the above data, my load operation. Definition (note that the dates are repeated now, it appears because 'wall' has already happened)

  68 2011-05 -31 00:00: 00.000 48 2011-05-30 00: 00: 00.000 92 2011-05-29 00: 00: 00.000 52 2011-05-28 00: 00: 00.000 32 2011-05-27 00: 00: 00.000 32 2011-05- 27 00: 00: 00.000 52 2011-05-28 00: 00: 00.000 81 2011-05-24 00: 00: 00.000   

Is there anyone like this Used to be?

looks like my entity

  var appadactu = context. GateWwuccadates () Where (D = & gt; DKPIDAT & lt; = overview & amp; amp; D.GELID == Zeoland & amp; amp; amp; d.clockworkID == ClockWorkID). Orderbidescoding (d = & gt; d. Kpidet);   

and it generates the correct T-SQL, which returns the correct value when executing it in SQL Query Analyzer.

The rest of the code

  Load operation = References. Load & lt; VwKeyData & gt; (Appetector); Lo.Completed + = New Event Handler (Load Operation_Full);   

EventHandler

  Public Zero Load Operation_Full (Object Sender, EventEurge E) {Load Operation & lt; VwKeyData & gt; HistResults = Sender as Load Operation & lt; VwKeyData & gt; Int _count = 0; Foreach (vvKeyData v) in Histrists. {.......   

From this point histResults.Entities are already wrong. Any help would be appreciated as it is some of the charting things that I am working to get screwed up.

You have to set the following.

  context.vwKeyData.MergeOption = MergeOption.OverwriteChanges;   

Overwrite Change will ensure that the data is always loading from the data source, it should help us solve our problem.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -