Develop a custom module withour OpenAccess ORM

Posted by Community Admin on 04-Aug-2018 10:18

Develop a custom module withour OpenAccess ORM

All Replies

Posted by Community Admin on 11-May-2011 00:00

Hi,

Is there a simple example out there of a custom module built for SF 4 that does not use OpenAccess ORM?
The "Jobs" module that comes with SDK (and not only this one) is poorly documented and for those unfamiliar with this orm, like me,  is making things harder.

Thanks.

Posted by Community Admin on 13-May-2011 00:00

Hi,  Like you I am researching this.  I have data in a different database (1500 records) that is manage with a linqtosql module in 3.7.  I don't want to tie down that data into sitefinity tables.   Currently setting up external pages to manage the data, but would like to have a module for it.

I did find where someone has done this with LinqtoSql. 

http://stackoverflow.com/questions/5643731/sitefinity-4-with-linq-to-sql


I am going to attempt to duplicate his solutions.  I might something on the way. :)  It will be another week before I have free time to research again (setting up a new Sitefinity 3.7 site, pretty site by the way).  I will post back if I make any progress.

Maybe if Rob (aka Modika on Stackoverflow) is reading this, he can share some sample code for us, and for Gabe to present it in a webiniar. 

David

Posted by Community Admin on 18-May-2011 00:00

Hi all,

The Jobs module is indeed using the OpenAccess ORM. We have a tutorial documenting each step of the process to create such a module here. Let us know if this documentation is not enough and what else you feel should be expanded or revised.

As for creating a module which does not use OpenAccess - we have received numerous requests for this, but we don't have sample code yet. It is one of our top priorities for the next release of the SDK (with Sitefinity 4.2). It would involve a lot more coding than creating the modules similar to Jobs and Products, but totally possible. As Ivan mentioned in his reply to the thread on StackOverflow - we use a provider model, so the only thing different would be to just implement a provider which uses LINQtoSQL.

Best wishes,
Slavo
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 26-May-2011 00:00

Hi,
in this page www.sitefinity.com/.../how-to-how-to-create-a-custom-content-based-module-using-the-module-in-your-website.html
You didn't mention how to use Jobs module.
after these steps

Registering a module

To register a module in Sitefinity project, perform the following:

  1. Build the Visual Studio solution, where the module was developed, by clicking Build Solution from the context menu of the solution.

  2. Browse to the bin folder of the solution.

  3. Copy the .dll file of the module project to the bin folder inside your Sitefinity folder.

  4. Go to the Sitefinity backend (http://<yoursite>/sitefinity).

  5. In the main menu, click Administration » Settings » Advanced.

  6. In the treeview on the left, click System » ApplicationModules.

  7. To register the module, click Create New.

  8. In the Name input field and in the Title input field, enter the name of your module. For example, enter MyModule.

  9. In the Type field, enter the fully qualified name of the module class. For example, enter MyModuleProject.MyModule.


how can I access this page www.sitefinity.com/.../UsingTheJobsModuleBackend.png

Posted by Community Admin on 26-May-2011 00:00

So, would it be possible to define relations between custom content-based modules?

For example: I use the ProductsModule but I want to link an OrderModule to it.
How would this be done?

Another example: I have a module that holds Companies, but I want to associated a person to it, who will be able to login on the front-end of my website.

Where should I start and is it possible with SF4.1 at the moment?

Regards,
Daniel

Posted by Community Admin on 30-May-2011 00:00

Hello Daniel ,

You can add custom dynamic fields that will allow you to make the relation between several modules. Another option is exposing a public property inside your object model , so this member will be a part of the data contract and you can serialize/deserialize it

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 13-Jun-2011 00:00

@Ivan: Is there any SDK (or other sample) code that shows how to setup the association mappings for generic content-based model entities?

We have looked at some of the OpenAccess documentation, but the examples are not specific to Sitefinity so we don't know if there are special considerations when trying to create an association between to model objects that inherit from Content.

Thank you for any insight!

Regards,
John

Posted by Community Admin on 14-Jun-2011 00:00

Hello John,

You should crate a mapping association

www.telerik.com/.../fluent-mapping-mapping-clr-mapping-associations.html

using HasAssociation property

sample

var draftMapping= new MappingConfiguration<Telerik.Sitefinity.Samples.Model.ItemDraft>();
            draftMapping.MapType(p => new ).Inheritance(InheritanceStrategy.Flat).SetTableName("sf_draft_items", this.Context);
            draftMapping.HasAssociation<Telerik.Sitefinity.Samples.Model.Item>(p => p.ParentItem).ToColumn("item_id");

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed