public static Category CreateCategory(string code, string name, string dealerCode) { Category cat = CategoryDAO.GetCategory(code, dealerCode); if (cat != null) return null; cat = new Category() { DealerCode = dealerCode, Name = name, Code = code }; DC.Categories.InsertOnSubmit(cat); DC.SubmitChanges(); return cat; }
private void detach_Categories(Category entity) { this.SendPropertyChanging(); entity.Dealer = null; }
private void attach_Categories(Category entity) { this.SendPropertyChanging(); entity.Dealer = this; }