Use Text attribute for common entity, shared across different data storage(In-memory,sqlserver,siaq)

11 views
Skip to first unread message

suba...@gmail.com

unread,
Mar 13, 2017, 2:19:04 AM3/13/17
to Siaqodb - NoSQL embedded database for .NET
Hello Team,

I am working with WebApi project with C# .Net.I am having a common entity like below:

public class User
{
   string Userid;
   string Description;
}

This is the base entity shared by all data storage's like in-memory, sqlserver and SiaqoDB etc.

While save a data with more than 100 char in SiaqoDB i need to decorate the entity like below;

By default SiaqoDB stores only 100 character in string type, I can't use the [Text] attribute in the entity as the project have all our entities didn't have the reference of SiaqoDB.

Let me know if there is a option to make the string column by default to accept more than 100 characters. 

Siaqodb - NoSQL embedded database for .NET

unread,
Jul 3, 2017, 2:15:04 PM7/3/17
to Siaqodb - NoSQL embedded database for .NET, suba...@gmail.com
Thank you for your inquiry.  At the moment, the [Text] attribute is the only way to handle this at the moment.  My suggestion as far as using a mixed model would be to use a pre-procesor directive like so:

#if WEB_API
[Text]
#endif

this way, the attribute is only used when the project is compiled for a certain platform.

This is a good idea though and we will consider this an option for future releases.  Thank you!
Reply all
Reply to author
Forward
0 new messages