This is a migrated thread and some comments may be shown as answers.

[Solved] Run Whole Application with one ObjectScope

7 Answers 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eastern
Top achievements
Rank 1
Eastern asked on 06 Nov 2010, 07:32 PM
hi,

i am project manager of my enterprise software team, i'm going to use openaccess orm as my .net orm .
the problem is , as we are concerning about 3tier application design ,
how should i use the objectscope in my entire enterprise application ?

can i use one objectscope for all the entire life of my application ?

my application would be winform with c# 3.5 and it will be runned on Lan for about 30 client.

thanks

7 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 08 Nov 2010, 11:42 PM
Hello Eastern,
If you choose the fat client approach, it is absolutely fine to use one scope over the complete lifetime of your application. Only if you have parallel operations you can create another scope.

Best wishes,
Jan Blessenohl
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eastern
Top achievements
Rank 1
answered on 09 Nov 2010, 07:33 AM
Thanks for your reply,

what do you mean by parallel operations ? 30 clients in LAN working on same database ?
or you mean openning MDI forms at the same time ?
0
Jan Blessenohl
Telerik team
answered on 11 Nov 2010, 03:05 PM
Hi Eastern,
I mean parallel things in one application, if that is MDI or just stacked makes not difference. I always use the following usecase to explain parallel transaction or parallel contexts/scopes:

Call center gets a call and some wants order someting. The agent opens the order form and fills out half of the order. At this point he finds out that the caller is not a customer yet and switches to the add new customer form. He is filling that out and presses ok. Continuing with the order form the caller say that he do not want the order any longer.

Now what happens if the order form is closed by the cancel button?
1. everything is done in one transaction that is now rollbacked -> new customer entry is lost
2. the customer form uses it's own context/scope and the new customer was commited on the ok button of the customer form -> everything is fine, the order is rolled back and the customer info is stored.

Regards,
Jan Blessenohl
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eastern
Top achievements
Rank 1
answered on 11 Nov 2010, 04:21 PM
ok , thanks

which one is the default behavior for one objectscope for whole application lifecycle ?
0
Jan Blessenohl
Telerik team
answered on 11 Nov 2010, 05:08 PM
Hello Eastern,
1

Greetings,
Jan Blessenohl
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eastern
Top achievements
Rank 1
answered on 11 Nov 2010, 06:09 PM
ok , thanks,

its good , and can i use Openaccess with POCO objects without any mapping ?

do you have any sample for it please
0
Alexander
Telerik team
answered on 16 Nov 2010, 02:04 PM
Hi Eastern,

In fact we provide additional code generation templates that generate data transfer objects (DTO). These objects can be used in disconnected scenarios like web services because they work on top of the persistent classes and do not depend on an object context. The templates are actually developed in order to be used in Plain WCF services. That is why the generated code contains the DataContract and DataMember attributes needed for the DataContractSerializer (the default WCF serializer).
The DTO templates are currently available only in our SDK, which you should be able to download from your account. Once you have the SDK installed, open the Plain WCF Service example to see how the new templates are used and if you decide to use them, just copy the Telerik.OpenAccess.DTO.tt file and the Includes folder to your DAL project. Hope that helps.

Kind regards,
Alexander
the Telerik team
See What's New in Telerik OpenAccess ORM in Q3 2010!
Monday, November 15, 11 am Eastern Time: Register here>>
Monday, November 15, 10 pm Eastern Time: Register here>>
Tags
General Discussions
Asked by
Eastern
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Eastern
Top achievements
Rank 1
Alexander
Telerik team
Share this question
or