private Country CreateCountry(string Name, string Code) { Country Country = ObjectSpace.FindObject <Country>(CriteriaOperator.Parse("Name=?", Name)); if (Country == null) { Country = ObjectSpace.CreateObject <Country>(); Country.Name = Name; Country.Code = Code; } return(Country); }
private Customer CreateCustomer(string Name, string Code, Country Country) { Customer Customer = ObjectSpace.FindObject <Customer>(CriteriaOperator.Parse("Name=?", Name)); if (Customer == null) { Customer = ObjectSpace.CreateObject <Customer>(); Customer.Name = Name; Customer.Code = Code; Customer.Country = Country; } return(Customer); }