Develop a custom module withour OpenAccess ORM
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.
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
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.
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
To register a module in Sitefinity project, perform the following:
Build the Visual Studio solution, where the module was developed, by clicking Build Solution from the context menu of the solution.
Browse to the bin folder of the solution.
Copy the .dll file of the module project to the bin folder inside your Sitefinity folder.
Go to the Sitefinity backend (http://<yoursite>/sitefinity).
In the main menu, click Administration » Settings » Advanced.
In the treeview on the left, click System » ApplicationModules.
To register the module, click Create New.
In the Name input field and in the Title input field, enter the name of your module. For example, enter MyModule.
In the Type field, enter the fully qualified name of the module class. For example, enter MyModuleProject.MyModule.
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
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
@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
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