Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 969775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:41:52+00:00 2026-05-16T02:41:52+00:00

Since where I work force me to use stored procedures and I haven’t been

  • 0

Since where I work force me to use stored procedures and I haven’t been around long enough to prevent it I have customized LiNQ to SQL code generation for all our stored procedures. Yes that’s right we have stored procedures for ALL our data access and since we don’t have table access it means that we often end up with 3 classes for all “entities”. Now, I am drawing near completion of the latest changes when I hit a wall.

The following code does not work and the reason being that it is calling itself but I need to get the overload. The reason for this is that it’s impossible to keep track of 40 parameters so I generate a “dynamic” class when the project builds.

[Function(Name="dbo.user_insert")]
public IList<ProcedureResult> UserInsert(UserInsertObj userInsertObj)
{
    IExecuteResult result = this.ExecuteMethodCall(this, (MethodInfo)MethodInfo.GetCurrentMethod(), 
        userInsertObj.UserId, userInsertObj.ProductId, userInsertObj.FromIp, 
        userInsertObj.CampaignName, userInsertObj.Campaign, userInsertObj.Login, 
        userInsertObj.Password, userInsertObj.Nickname, userInsertObj.Pin, userInsertObj.Language, 
        userInsertObj.Currency, userInsertObj.Country, userInsertObj.Region, userInsertObj.Birthday, 
        userInsertObj.FirstName, userInsertObj.MiddleName, userInsertObj.LastName, 
        userInsertObj.Address1, userInsertObj.Address2, userInsertObj.Address3, userInsertObj.Zip, 
        userInsertObj.City, userInsertObj.Timezone, userInsertObj.Email, userInsertObj.EmailNotify, 
        userInsertObj.Gender, userInsertObj.Phone, userInsertObj.MobileCc, userInsertObj.MobileNr, 
        userInsertObj.MobileModel, userInsertObj.Referral, userInsertObj.GroupId, 
        userInsertObj.StreetNumber, userInsertObj.StreetName);

    return new List<ProcedureResult> 
    { 
        new ProcedureResult
        {
            Name = "userId",
            Value = result.GetParameterValue(0),
            Type = typeof(System.Nullable<System.Int32>) 
        }
    };
}

I played around with using something like the below but have no idea which overload to use and searching MSDN I haven’t come close to anything useful yet.

((MethodInfo)MethodInfo.GetCurrentMethod()).DeclaringType.GetMethod("", new Type[] {})

How would I achieve getting the overload from the CurrentMethod?

EDIT: clarified that we are not allowed to use the database tables.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:41:53+00:00Added an answer on May 16, 2026 at 2:41 am

    I forgot about linq! In this particular scenario I have only two methods one containing 1 parameter and one containing all the other parameters so a simple (see below) works fine:

    method.DeclaringType.GetMethods()
        .Where(x => x.Name == "UserInsert" 
               && x.GetParameters().Count() > 1)
        .Single()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been programming since 1999 for work and fun. I want to learn
I have to make dynamic hashes, so the class example won't work since the
Since updating to version 3.0.1 of MonoDevelop, I've been unable to work with layout
I'm working with some binary data that I have stored in arbitrarily long arrays
Here is the snapshot of the query that doesn't work since I added the
I'm having a problem with a part of code. It should work,since it is
This code below doesn't work correctly since my MFC program is in unicode circumstance.
Since I am writing a seminar work on Transaction Processing in MS Azure for
since the Sitemap of VS2008 does not work with MVC, I found MVC Sitemap
I ask since a project I work on generates a single, monolithic DLL of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.