<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=370885&amp;view=findpost&amp;p=3261775</guid>
        <pubDate>Wed, 16 Jan 2013 05:28:41 +0000</pubDate>
        <title>Entity, обнаовленые данные из БД</title>
        <link>https://forum.sources.ru/index.php?showtopic=370885&amp;view=findpost&amp;p=3261775</link>
        <description><![CDATA[Relaxander: context.Refresh(RefreshMode.StoreWins, context.Items)]]></description>
        <author>Relaxander</author>
        <category>.NET: Базы данных</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=370885&amp;view=findpost&amp;p=3261704</guid>
        <pubDate>Tue, 15 Jan 2013 18:26:49 +0000</pubDate>
        <title>Entity, обнаовленые данные из БД</title>
        <link>https://forum.sources.ru/index.php?showtopic=370885&amp;view=findpost&amp;p=3261704</link>
        <description><![CDATA[Aram: Здравствуйте&#33; Я написал следующий запрос<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">filterItems = from i in context.Items</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;where i.TB_ItemName.Contains(&quot;Table1&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;select i;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
где,<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;public partial class EstimateEntities : ObjectContext</div><div class="code_line">{}</div><div class="code_line">EstimateEntities context;</div><div class="code_line">public ObjectSet&#60;Item&#62; Items</div><div class="code_line">&nbsp;</div><div class="code_line">public partial class Item : EntityObject</div><div class="code_line">{}</div></ol></div></div></div></div><br>
<br>
Запрос выполняется нормально.<br>
 В базе данных вручную меняю значение Table1 на Table2. <br>
Выполняю тот же запрос, но  where i.TB_ItemName.Contains(&quot;Table2&quot;). Запрос выполняется но filterItems.First().TB_ItemName= Table1 вместо Table2.<br>
Т.е. получается если другой пользователь изменит значения в базе данных то программа все равно будет работать со старыми данными.<br>
Скажите пожалуйста нельзя ли без применения context=new EstimateEntities() получить обновленные данные из базы данных.]]></description>
        <author>Aram</author>
        <category>.NET: Базы данных</category>
      </item>
	
      </channel>
      </rss>
	