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

Use more .NET Attribute for Configuration

1 Answer 60 Views
Feature Requests
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Fakhru
Top achievements
Rank 2
Fakhru asked on 31 May 2009, 03:30 AM
I'm currently using OpenAccess Express and get it work manualy (I use Visual Studio Express).
As far I can see, OpenAccess use so little attribute on Persistance class.

It would be nice, if some configuration like FieldLength or Nullable can be change via attribute like:

[Persistent]
public class A
{
     [FieldLength=100, Nullable(true)]
     string name;
}


1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 01 Jun 2009, 06:40 AM
Hi Fakhru,

In order to keep the .NET code cleaner, OpenAccess keeps these field-specific settings in the app.config.  Here is a sample entry in XML:
<field name="firstName" null-value="exception"
   <extension key="db-column"
      <extension key="db-length" value="100" /> 
   </extension> 
</field> 


Kind regards,
Zoran
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Feature Requests
Asked by
Fakhru
Top achievements
Rank 2
Answers by
Zoran
Telerik team
Share this question
or