Exemple #1
0
 public void AddContent(IEnumerable <IPerson> persons)
 {
     foreach (IPerson _item in persons)
     {
         Person _newPerson = new Person()
         {
             FirstName = _item.FirstName,
             LastName  = _item.LastName,
             Age       = _item.Age
         };
         this.Persons.InsertOnSubmit(_newPerson);
         foreach (ICDCatalog _cdEntity in _item.CDs)
         {
             CDCatalogEntity _newEntity = new CDCatalogEntity()
             {
                 Title   = _cdEntity.Title,
                 Person  = _newPerson,
                 Country = _cdEntity.Country,
                 Price   = _cdEntity.Price,
                 Year    = (short)_cdEntity.Year
             };
             this.CDCatalogEntities.InsertOnSubmit(_newEntity);
         }
         this.SubmitChanges();
     }
 }
Exemple #2
0
 partial void DeleteCDCatalogEntity(CDCatalogEntity instance);
Exemple #3
0
 partial void UpdateCDCatalogEntity(CDCatalogEntity instance);
Exemple #4
0
 partial void InsertCDCatalogEntity(CDCatalogEntity instance);
Exemple #5
0
 private void detach_CDCatalogEntities(CDCatalogEntity entity)
 {
     this.SendPropertyChanging();
     entity.Person = null;
 }