Closed AdrianBathurst closed 7 years ago
Hi @AdrianBathurst, that sound a bit strange for me, because in my needs I always need send all properties to server to get more concise view model in server. [Local] are a really excpeption about this, I will use only when has a list/grid items read-only.
I don't know how you image to use, but it´s not better define this in method? Some like this:
// Send all $data except properties marked as [Local]
[SendData]
public void Save()
{
}
// Do not send any $data fom client
[DoNotSendData]
public void Load(int id)
{
}
(ok, this attributes name are terrible but I didn't think any better now 😄 )
Thinking about it some more, you are right. I will add more components to make it more modular. Then each component will have a better viwemodel and fewer local attributes.
So lets leave it as it is. Thanks again!
A suggestion...
The [Local] property attribute is working great, again thank you for that. What I'm finding is that I mark most of the server-side properties as "local" as I only post back what is necessary.
So my suggestion is, what if it was the reverse? Make all server-side public properties "local" by default and have a property attribute called [Postback] for properties you want to post back with each request.
so this...
becomes...
and this...
becomes...
Not a problem if you disagree as it works fine! :)