CodeSmith Community
Your Code. Your Way. Faster!

Webmethod wrapper generated incorrectly

Latest post 01-09-2007 2:39 PM by t_h_. 0 replies.
  • 01-09-2007 2:39 PM

    • t_h_
    • Not Ranked
    • Joined on 01-09-2007
    • Posts 1
    • Points 5

    Webmethod wrapper generated incorrectly

    When selecting the servicelayer option along with custom sp wrapper generation, code such as the following can be created.

    /// <summary>
    /// This method wrap the spSessionPurge stored procedure.
    /// </summary>
    [WebMethod(Description="This method wrap the spSessionPurge stored procedure.")]
    public void SessionProvider_SessionPurge(int start, int pageLength)
    {
             SessionService serviceObject = new SessionService();
             return serviceObject.SessionPurge(start, pageLength );
    }

    Obviously since the webmethod is void,  it can't return anything.  I can think of two ways to fix this.

    1. Have stored procedures that dont return anything return something.

    2.  Check for void type in the template and dont write the return keyword.

    I prefer the 2nd, but I dont know how.  Can I get some pointers? 

    PS I filed this via codesmith help yesterday.  I have yet to recieve a reply. 

     

     

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems