public class Customer : Zetbox.Domain.Entity { public string Name { get; set; } public DateTime BirthDate { get; set; } public Address BillingAddress { get; set; } }
public class CustomerRepository : Zetbox.Domain.Repository{ public CustomerRepository(Zetbox.Platform.IDatabase db) : base(db) { } }
var repo = new CustomerRepository(db); var customers = repo.FindAll(c => c.Name.Contains("John")); foreach (var customer in customers) { Console.WriteLine(customer.Name); }In this example, we create a CustomerRepository object and use its FindAll method to retrieve all customers whose name contains the string "John". We then loop through the resulting collection and output each customer's name to the console. Overall, Zetbox is a powerful framework for enterprise-level software development that emphasizes domain-driven design principles. Its core package library, Zetbox.Core, provides a wealth of useful classes and utilities for building sophisticated applications.