Best Practices for WebService CRUD operations

  1. #1

    Best Practices for WebService CRUD operations



    What is the best way to use webservices? I'm looking at the Examples folder ( Examples\GridPanel\Shared\SuppliersSaveWithConfirm ation.ashx.cs) among others.

    I notice it uses SerializeableEntities for all CRUD operations. I use Linq to Sql for my data layer and I'm wondering if for real world apps where I either don't want all the columns for a table, or, I want to reference other entities that are not defined in LinqToSql, what is the best way to procede. I keep thinking linq to entities might be in my future, but it seems a little to soon from what I can tell. I'm wanting my web service to able to return something like an IQueryable as follows:

    
    
    var query = from tbl in db.CampFeedTypes
    
    
    select new
    
    
    {
    
    
    MyName = tbl.Name,
    
    
    MyValue = tbl.id + "#"
    
    
    };
    It seems like I have to make an actual static entity out of each of my return types. is that true?

    The other area I'm concerned about is making more consistent updates. That is, I want to keep a special column in my table called something like LastUpdateTime, and then on the actual update, I want to read what that value was on my original read (not the read just before the update), but the one associated with the user looking at the data. I understands that means somehow I need to save that state. My apps general require that level of consitency checking.



  2. #2

    RE: Best Practices for WebService CRUD operations

    Hi Peter,

    You have a nack for asking questions that are difficult to answer or require a large expenditure of brain power to formulate a response. I need more time to think about this, run a few more tests and create a few more samples.*


    The WebService examples were created a 3+ months ago and I think we need to revisit. We can probably provide a fresh approach and do so with your requirements in mind.*


    Geoffrey McGill
    Founder

Similar Threads

  1. Tablelayout & colspan- best practices
    By springrider in forum 1.x Help
    Replies: 0
    Last Post: Aug 18, 2011, 10:35 PM
  2. Replies: 2
    Last Post: Mar 11, 2011, 7:23 PM
  3. [CLOSED] Translation/localization, Official or Best Practices
    By opendat2000 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 09, 2011, 2:36 PM
  4. Relatively complex operations with AjaxMethods
    By henricook in forum 1.x Help
    Replies: 3
    Last Post: May 17, 2010, 1:45 PM
  5. Window management best practices
    By dbassett74 in forum 1.x Help
    Replies: 1
    Last Post: Apr 20, 2009, 8:24 PM

Posting Permissions