Entity Framework and Connection Pooling

前端 未结 4 1771
一个人的身影
一个人的身影 2020-11-21 06:00

I\'ve recently started to use the Entity Framework 4.0 in my .NET 4.0 application and am curious about a few things relating to pooling.

  1. Connection pooling

4条回答
  •  旧时难觅i
    2020-11-21 06:40

    Below code helped my object to be refreshed with fresh database values. The Entry(object).Reload() command forces the object to recall database values

    GM_MEMBERS member = DatabaseObjectContext.GM_MEMBERS.FirstOrDefault(p => p.Username == username && p.ApplicationName == this.ApplicationName);
    DatabaseObjectContext.Entry(member).Reload();
    

提交回复
热议问题