2 Replies - 212 Views - Last Post: 01 December 2012 - 02:29 AM Rate Topic: -----

#1 sen1668  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 02-March 12

Perfomace Issue

Posted 01 December 2012 - 01:16 AM

0 down vote favorite


I'm developing an application using Entity Framework but instead declare each entity to save in each form I'm using dynamic variable in form class, is there a perfomance issue, coding like this and is there a better solution ?

dynamic ocurr = bs_active.Current;
try {ocurr.USERID_CR = GlobalAppVariable.cUserLogin;}catch(Exception){}
try {ocurr.DT_CR = DateTime.Now;}catch(Exception){}



bs_active is binding souce with the datasource is objectentity each table/entity have fields USERID_CR dan DT_CR

any help/comment please ?

thanks
Sen

Is This A Good Question/Topic? 0
  • +

Replies To: Perfomace Issue

#2 Momerath  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 996
  • View blog
  • Posts: 2,409
  • Joined: 04-October 09

Re: Perfomace Issue

Posted 01 December 2012 - 02:22 AM

Yes, there is a performance issue using dynamic as the system has to determine it's type at every assignment. You probably won't notice it.

This looks exactly like something I was just reading in MSDN magazine August 2012 (vol 27 No 8) issue in the Data Points column titled "Pitfalls and Pointers for a Base Logging Class in EF Models".
Was This Post Helpful? 2
  • +
  • -

#3 sen1668  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 02-March 12

Re: Perfomace Issue

Posted 01 December 2012 - 02:29 AM

thanks for your information I will look deeper in the MSDN article
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1