Re: Entity Framework - the lay of the land

2016-09-20 Thread David Rhys Jones
I agree that it's a call that you don't need if you are sure that the object that you have now has not been updated by someone else. However even if I was updating via an SQL Statement (SP or inline) then I would do a select to get the updated line back from the database, especially if it wasn't

Re: Entity Framework - the lay of the land

2016-09-20 Thread Tony McGee
Oh boy, this is a technique I see way underutilised when using EF: /All objects from EF were transformed into new objects for use in the website /e.g. If I just want a high level list of the product categories a customer has purchased, it's far too easily get stuck in a rigid thought pattern

RE: Entity Framework - the lay of the land

2016-09-20 Thread 罗格雷格博士
But if you know the ID of something and you want to update it, why do a round trip to read it first, then to do another round trip to update it like you could have in the first place? Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL

Re: Entity Framework - the lay of the land

2016-09-20 Thread David Rhys Jones
That's still the best way to update something Get the object first, then update that reference, instead of trying to attach a new object with the same Id. There is a performance hit, but you are updating it's not needed to be quick. If your requirement is speed when updating, then you shouldn't

RE: Entity Framework - the lay of the land

2016-09-20 Thread 罗格雷格博士
Have they fixed the update situation yet? I remember that you had to select something before you could update it. (At least previously) Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web:

Re: Entity Framework - the lay of the land

2016-09-20 Thread David Rhys Jones
I've been working with EF now for a few years, here's a list of what went wrong / what went right. *Large public Website* *Good:* No complex queries in EF, anything more than a couple of tables and a stored procedure is called. All objects from EF were transformed into new objects for

Re: Entity Framework - the lay of the land

2016-09-20 Thread David Connors
On Tue, 20 Sep 2016 at 13:59 Greg Low (罗格雷格博士) wrote: > I often get coy when I hear comparisons with Stack Overflow, Twitter, > Facebook, Blog Engines, etc. though. > > Most of those platforms are happy to just throw away transactions when the > going gets heavy. > Also, most

Re: Expired MSDN Subscription - Transfer of VS to a new machine

2016-09-20 Thread 罗格雷格博士
VS Community Edition not enough now? I see many individuals using it. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.com On Tue, Sep 20, 2016 at 5:11 PM +1000, "Chris

Re: Expired MSDN Subscription - Transfer of VS to a new machine

2016-09-20 Thread Chris F
Thinking outside the box. Can you put in a complaint under Australian Consumer Law (ACL). https://www.accc.gov.au/consumers/complaints-problems/make-a-consumer-complaint Basically they are failing to honour your original agreement. So ask for a refund/replacement under ACL. Cheers, Chris On