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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:21:48+00:00 2026-05-20T03:21:48+00:00

I am trying to create a simple setting in Orchard that appears in the

  • 0

I am trying to create a simple setting in Orchard that appears in the settings page. I have created a module which is adding my ContentPart to the settings page and is correctly creating a table in the database but every time the cshtml file is rendered and the property of the record is accessed I keep getting the following NHibernate Record.

No persister for: TekFlow.Contact.TekFlowEmailSettingsPartRecord.
(TekFlow.Contact is the Module name)

Below is all of the code that I am using to create the Record/Part/Handler/Driver needed in Orchard.

 public class TekFlowEmailSettingsPartDriver : ContentPartDriver<TekFlowEmailSettingsPart>
{
    public TekFlowEmailSettingsPartDriver()
    {
        T = NullLocalizer.Instance;
    }

    public Localizer T { get; set; }

    protected override DriverResult Editor(TekFlowEmailSettingsPart part, dynamic shapeHelper)
    {
        return ContentShape("Parts_TekFlowEmailSettings_Edit",
            () => shapeHelper.EditorTemplate(TemplateName: "Parts.TekFlowEmailSettings", Model: part, Prefix: Prefix)
                );
    }

    protected override DriverResult Editor(TekFlowEmailSettingsPart part, Orchard.ContentManagement.IUpdateModel updater, dynamic shapeHelper)
    {
        bool success = updater.TryUpdateModel(part, Prefix, null, null);
        return Editor(part, shapeHelper);
    }
}

[UsedImplicitly]
public class TekFlowEmailSettingsPartHandler : ContentHandler
{
    public TekFlowEmailSettingsPartHandler(IRepository<TekFlowEmailSettingsPartRecord> repository)
    {
        Filters.Add(new ActivatingFilter<TekFlowEmailSettingsPart>("Site"));
        Filters.Add(StorageFilter.For(repository));
    }
}

 public class TekFlowEmailSettingsPartRecord : ContentPartRecord {
     public virtual string SendToEmail { get; set; }
}

 public class TekFlowEmailSettingsPart : ContentPart<TekFlowEmailSettingsPartRecord>
 {
     public string SendToEmail
     {
         get { return Record.SendToEmail; }
         set { Record.SendToEmail = value; }
     }
 }

 public class TekFlowEmailSettingsDataMigration : DataMigrationImpl
 {
     public int Create()
     {
         SchemaBuilder.CreateTable("TekFlowEmailSettingsPartRecord",
             table => table
                 .ContentPartRecord()
                 .Column<string>("SendToEmail", c => c.WithDefault("SomeEmail@somedomain.com").WithLength(255))
             );


         ContentDefinitionManager.AlterPartDefinition(
             typeof(TekFlowEmailSettingsPart).Name, cfg => cfg.Attachable());

         return 1;
     }
 }
  • 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-20T03:21:49+00:00Added an answer on May 20, 2026 at 3:21 am

    Turns out that if your Part and Record are not in your “Models” namespace that this wont work in orchard. When I changed the Namespace for the two classes it worked. Must be an assumption that Orchard is making.

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

Sidebar

Related Questions

I am trying to create a simple page that enters data in to a
I'm new to postgreSQL and I have a simple question: I'm trying to create
I'm trying to create a very simple REST server. I just have a test
I am trying to create a simple log in system that uses ajax but
I'm trying to create a simple spring based webservice that supports a post with
I am trying to create a simple dialog in MFC using Visual C++. My
I'm trying to create a simple BaSH-like grammar on ANTLRv3 but haven't been able
I'm trying to create a simple toggling sidebar using jquery, where it expands and
I'm playing with the ASP.NET MVC Framework, trying to create a simple site. My
I am trying to create a rather simple effect on a set of images.

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.