I'm wondering what is the best way to represent a table that should contain those fields in C# bond format?
- string FirstName
- string LastName
- string Email
- bool Registered
- DateTime DateJoined
- char Gender
- List<string> Favorites
- string City
- string State
- unit16 Zip
- string Country
- List<string> FrequentPagesURLs
And I want to have something similar to that format
namespace MyProject
{
struct Key
{
0: required string Email;
}
struct Value
{
0: required string FirstName;
1: optional char Gender;
.
.
.
}
}
I'm not sure what is the best way to represent char, DateTime, and List<string> in C# bond format to use them in creating table in Object store.
According to the official documentation for Bond, there are the following types:
However, the documentation also explains how to generate the DateTime, char, etc. if you are using bond to generate C# code. That is to use the following in your CLI command:
The using parameter is where you put type aliases, such as "char=System.Char;DateTime=System.DateTime".
I don't know if this adequately helps you, please let me know if you need anything else.
Sources:
https://microsoft.github.io/bond/manual/compiler.html
https://microsoft.github.io/bond/manual/bond_cs.html