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

  • Home
  • SEARCH
  • 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 3681024
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:38:45+00:00 2026-05-19T03:38:45+00:00

The table structure is : The controller action to insert a row to table

  • 0

The table structure is :

alt text

The controller action to insert a row to table is
public bool CreateInstnParts(string data)
{
IDictionary myInstnParts = DeserializeData(data);

        try
        {
            HSInstructionPart objInstnPartBO = new HSInstructionPart();
            using (ISession session = Document.OpenSession())
            {
                using (ITransaction transaction = session.BeginTransaction())
                {
                    objInstnPartBO.DocumentId = Convert.ToInt32(myInstnParts["documentId"]);
                    objInstnPartBO.InstructionId = Convert.ToInt32(myInstnParts["instructionId"]);
                    objInstnPartBO.PartListId = Convert.ToInt32(myInstnParts["part"]);
                    objInstnPartBO.PartQuantity = Convert.ToInt32(myInstnParts["quantity"]);
                    objInstnPartBO.IncPick = Convert.ToBoolean(myInstnParts["incpick"]);
                    objInstnPartBO.IsTracked = Convert.ToBoolean(myInstnParts["istracked"]);

                    objInstnPartBO.UpdatedBy = User.Identity.Name;
                    objInstnPartBO.UpdatedAt = DateTime.Now;
                    session.Save(objInstnPartBO);

                    transaction.Commit();
                }
                return true;
            }
        }
        catch (Exception ex)
        {
            Console.Write(ex.Message);
            return false;
        }
    }

This is throwing an exception

NHibernate.MappingException was caught
Message=”No persister for: Hexsolve.Data.BusinessObjects.HSInstructionPart”
Source=”NHibernate”
StackTrace:
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String entityName)
at NHibernate.Impl.SessionImpl.GetEntityPersister(String entityName, Object obj)
at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.Save(Object obj)
at HexsolveMVC.Controllers.InstructionController.CreateInstnParts(String data) in F:\Project\HexsolveMVC\Controllers\InstructionController.cs:line 1342
InnerException:

Can anyone help me solve this??

  • 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-19T03:38:46+00:00Added an answer on May 19, 2026 at 3:38 am

    You probably miss the hbm mapping file. Did you remember to put the “Embedded Resource” compiltion flag on your mapping file ?

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

Sidebar

Related Questions

Data table structure is: id1,id2,id3,id4,... (some other fields). I want to create summary query
I have a table structure that looks like: <table> <tr id=row1> <td> <div>row 1
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I have a table structure: <tr> <td> <a href=# class=xx></a> </td> <td> data </td>
My table structure looks like this: tbl.users tbl.issues +--------+-----------+ +---------+------------+-----------+ | userid | real_name
Assume a table structure of MyTable(KEY, datafield1, datafield2...) . Often I want to either
Given a table structure like this: CREATE TABLE `user` ( `id` int(10) unsigned NOT
In the following table structure: Fruits ( fruit_id, fruitName ) Vegetables ( vegetable_id, vegetableName
I've got a table structure I'm not really certain of how to create the
I have the following table structure CREATE TABLE `table` ( `id` int(11) NOT NULL

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.