We use do.net in our project here and are having some performance issues. To solve some of these issues we are going to use Indexed Views.

I found the MaterializedViewAttribute, does that do anything?

If I create the views, can I mark a class read-only so no one accidentally tries to update from the class?

I can also use getter only properties but read-only would be much clearer.

asked Apr 24 '12 at 10:01

MikeBenson's gravatar image


edited Apr 26 '12 at 14:57

2 Answers:

All you really need is an attribute that says "don't try to do anything with this object. When it goes to run, trust me it will work". That way you give a lot of flexibility in the model without trying to solve all of the problems. This is the second time I have tried to use DO.net and both times I have run into problems with enterprise level functionality. Sometimes you have to give customers enough flexibility to hang themselves with.

I would love to be able to use this product over a data warehouse for reporting. Unfortunately, this feature is going to push me to use Entity framework for this solution because I can just turn off all validation and it goes into the "trust the developer" mode. Even better, EF will allow me to do this at the context level, so I don't have to allow it to do any validation.

In many cases the handling of schema etc... is done by a dba team and we developers have no control. With the approach do.net took, you have essentially limited your product to smaller silo applications

answered Apr 26 '12 at 14:58

MikeBenson's gravatar image


Hello Mike,

[MaterializedViewAttribute] does nothing at the moment.

It is supposed to be used on persistent interfaces to turn them into materialized views either native or emulated via tables.

You can create views, but those would not be utilized by DO.Net.

answered Apr 25 '12 at 04:34

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov

Is there any way to map an object to a materialized view, basically tell do.net to not try to do a perform on it?

(Apr 25 '12 at 09:03) MikeBenson MikeBenson's gravatar image

For now there is no way to map entities to materialized views.

(Apr 25 '12 at 10:05) Denis Krjuchkov Denis%20Krjuchkov's gravatar image

Any idea when you will add support for views and or materialized views? Enterprise data designs like horizontal partitioning and reporting structures are pretty common and should not just be dismissed, unless your product is really not designed for large implementations like that.

(Apr 25 '12 at 11:55) MikeBenson MikeBenson's gravatar image

Mike, you can suggest features via uservoice service: http://dataobjects.uservoice.com

Surely we could add support for views but this feature was not actively requested. That is why it was not implemented.

(Apr 26 '12 at 08:22) Denis Krjuchkov Denis%20Krjuchkov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA