Hi
I have an app(silverlight) that i'm messing around with and my scenario is as follows:
1. I have a WCF service setup so that it will return a list of customers(This is not using EF, RIA services etc. - just a webservice that calls sps that return the records)
2. I have a Model of customers that i fill with this information.
3. I then have a public property of ObservableCollection<Customers> in my ViewModel.
4. In my View i have a grid which is bound to the customer property in the ViewModel.
When i run it and i load the customers from my service everything runs perfectly.
Customer:
CustomerID(AutogeneratedID - SQL server)
Name
Address
What is the procedure for adding new customers? If i let the user enter the Name and Address fields and call the storedProcedure for inserting the new customer this should return the new AutogeneratedID for the new customer - i think i should be able to get this to work.
Do i then have to reload the data into the customer Model?, then reload the data into the ObservableCollection<Customer> in the ViewModel so that i can see/read the new CustomerID?
Have you any examples of this? I know it's not specific to your controls but this is what i need to be able to do.
Again i'm not using RIA services, EF, I'm just calling a stored procedure reading results and filling a Model. I can't find any examples on the web for this.
Thanks
Paul
I have an app(silverlight) that i'm messing around with and my scenario is as follows:
1. I have a WCF service setup so that it will return a list of customers(This is not using EF, RIA services etc. - just a webservice that calls sps that return the records)
2. I have a Model of customers that i fill with this information.
3. I then have a public property of ObservableCollection<Customers> in my ViewModel.
4. In my View i have a grid which is bound to the customer property in the ViewModel.
When i run it and i load the customers from my service everything runs perfectly.
Customer:
CustomerID(AutogeneratedID - SQL server)
Name
Address
What is the procedure for adding new customers? If i let the user enter the Name and Address fields and call the storedProcedure for inserting the new customer this should return the new AutogeneratedID for the new customer - i think i should be able to get this to work.
Do i then have to reload the data into the customer Model?, then reload the data into the ObservableCollection<Customer> in the ViewModel so that i can see/read the new CustomerID?
Have you any examples of this? I know it's not specific to your controls but this is what i need to be able to do.
Again i'm not using RIA services, EF, I'm just calling a stored procedure reading results and filling a Model. I can't find any examples on the web for this.
Thanks
Paul