how to save records in the sample code available

Posts   
 
    
vsv
User
Posts: 17
Joined: 18-Sep-2007
# Posted on: 26-Sep-2007 22:36:39   

using (DataAccessAdapter adapter = new DataAccessAdapter()) { adapter.SaveEntityCollection(this._ordersDesignerCollection, true, false); }

the above code after new record/this script is not saving data to the database. in the sample application NOrthwind.Databinding using complex form.

vsv
User
Posts: 17
Joined: 18-Sep-2007
# Posted on: 27-Sep-2007 00:40:57   

Northwind.DAL.FactoryClasses.OrderEntityFactory ent3 = selectedCustomer.Orders; Cannot implicitly convert type 'Northwind.DAL.HelperClasses.EntityCollection<Northwind.DAL.EntityClasses.OrderEntity>' to 'Northwind.DAL.FactoryClasses.OrderEntityFactory' i get the above error

vsv
User
Posts: 17
Joined: 18-Sep-2007
# Posted on: 27-Sep-2007 01:03:56   

this._ordersDesignerCollection = selectedCustomer.Orders; Cannot implicitly convert type 'Northwind.DAL.HelperClasses.EntityCollection<Northwind.DAL.EntityClasses.OrderEntity>' to 'Northwind.DAL.HelperClasses.EntityCollection'

I get the above error when I try to bind to the collection datasource. any help please. thanks in advance

vsv
User
Posts: 17
Joined: 18-Sep-2007
# Posted on: 27-Sep-2007 01:12:20   

i am getting closer, but how to cast from EntityCollection to EntityCollection<T> and viceversa. thanks

vsv
User
Posts: 17
Joined: 18-Sep-2007
# Posted on: 27-Sep-2007 01:13:43   
            EntityCollection<OrderEntity> ent = (EntityCollection<OrderEntity>)this._ordersGridView.DataSource;
            adapter.SaveEntityCollection(ent, true, false);

this worked but how to convert between EntityCollection & EntityCollection<T> thanks vsv

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 27-Sep-2007 10:25:07   

how to convert between EntityCollection & EntityCollection<T>

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=10908

That's related with you trying to get the example to works?

David Elizondo | LLBLGen Support Team