c# - Reducing number of trips from Silverlight App to Database -


i working on silverlight application. have view allows user add new object. viewmodel bound view has collection of object type property. constructor of viewmodel has function, getdata() calls wcf service , fetches data database, adds fetched list collection.

after adding new object database through wcf service, method getdata needs called again refresh collection having latest data in collection necessary.

this process little slow every time 1 adds anything, entire data tables need fetched again. can more slower data grows more , more large , when joining of multiple tables may required data.

i thinking of adding object pass service add database, directly collection in viewmodel. obviously, add object collection when service called has not returned error make sure has been added db. way can have latest data in collection without need fetch database.

can 1 point out drawback approach or scenario may fail? also, please suggest if there other better ways of achieving goal.

i have save methods fetch , return object saved. way if service/db layer has modified @ (create date, id etc. etc.) changes. if want update it, not think "new".


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -