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 974157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:23:25+00:00 2026-05-16T03:23:25+00:00

I have stored procedures that take a user’s username (to log who makes changes

  • 0

I have stored procedures that take a user’s username (to log who makes changes to the database) in addition to other information (like name, ID, email, etc.). Within the stored procedure I look up the user’s ID and store that in the table.

The issue I am experiencing is that the Entity Table does not match the input of the stored procedure, therefore there is no way to map (or include) the user’s username.

Is there a standard way to include non-entity properties in a stored procedure mapping?

  • 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-16T03:23:26+00:00Added an answer on May 16, 2026 at 3:23 am

    If I get your question correctly (not entirely sure I do), then:

    1. If you aren’t already using your own DataContext derived class, do so.
    2. Add a method that calls ExecuteMethodCall in that class (it’s protected, so you can only call it from a derived type, passing in “raw” types (the relevant strings, ints, datetimes, etc. rather than instances of entity classes).
    3. Add a method (presumably to your entity class, though it could live elsewhere) that does the necessary work for obtaining the username (whether it’s a member of your class or input from elsewhere etc. isn’t clear in your question) and calls the method on your DataContext-derived class.

    Hope that’s useful, and I’m not mis-reading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a c# application that interfaces with the database only through stored procedures.
I have several Stored Procedures that when added to my dbml, it seems that
I have some complex stored procedures that may return many thousands of rows, and
I have stored procedures in SQL Server T-SQL that are called from .NET within
I have a stored procedure that runs to update gaming points for user balances.
I have seen some stored procedures that wrap everything in a transaction. begin transaction
I have a set of stored procedures that I am using to populate an
I have a strange, sporadic issue. I have stored procedure that returns back 5
I have a stored procedure that consists of a single select query used to
I have a stored procedure that returns multiple tables. How can I execute and

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.