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

[Solved] Can I use [Transient] MyProperty { get; set; } ??

1 Answer 53 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.
Andrey
Top achievements
Rank 1
Andrey asked on 06 Sep 2010, 01:50 PM

I have in my Entity-class field, which will be calculated - it is not saved in DB.

And for Binding to some control in my View I should use property for it.

I try write this:

1.[Transient]
2.public MyProperty {get; set;}
but field in DB was created too.

How I should use it?

1 Answer, 1 is accepted

Sort by
0
Accepted
IT-Als
Top achievements
Rank 1
answered on 06 Sep 2010, 02:46 PM
Hi Andrey,

Use it on (private) field backing the public property.

Regards

Henrik
Tags
General Discussions
Asked by
Andrey
Top achievements
Rank 1
Answers by
IT-Als
Top achievements
Rank 1
Share this question
or