[Zetbox.DBMeta.DBTable(IsView = true)] public class PersonView : BaseObject { [Browsable(false)] [Zetbox.DBMeta.DBForeignKey(typeof(Person))] public virtual Person Person { get; set; } [DisplayName("Person's Name")] [Zetbox.DBMeta.DBExpression("Person.FirstName + ' ' + Person.LastName")] public virtual string Name { get; set; } [DisplayName("Email")] [Zetbox.DBMeta.DBExpression("Person.Email")] public virtual string Email { get; set; } }
var persons = Zetbox.Basic.InProcessSession.Current.Query() .Where(p => p.Age >= 18 && p.Age <= 30) .OrderBy(p => p.LastName) .ToList();
var person = new Person() { FirstName = "John", LastName = "Doe", Age = 25, Email = "[email protected]" }; Zetbox.Basic.InProcessSession.Current.Save(person);This code creates a new `Person` object and saves it to the database using Zetbox. Overall, Zetbox is a powerful tool for developers who need to create and manage object-oriented databases in C#. Its easy-to-use interface and rich feature set make it a popular choice among many developers.