0

i want use the Entity Framework with Catel to use the UoW pattern in my code. I have reade this article:

http://www.geertvanhorrik.com/category/catel/page/2/

I create a new Project with the name "Database". In this project i implement my Application Models. At the moment i store the data in a XML file but i want store it in a SQL Database in the future. My models a derived from "SaveableModelBase".

public class SettingsDataObject : SavableModelBase

1) What must i do to use the Entityframework? Is there a EntityModelBase or something? 2) How i must design my model classes? 2) How i register the Repositories with the ServiceLocator? RegisterType< ..., ...>? 3) Can i use the "Code First" and AutoGenerate Database Tables in Catel?

Where i can find a good basic code Example to implement the UoW pattern with Catel? What must i do to implement a UoW with Catel?

I hope anybody can help me,

Thank you & Greetings

1 Answers1

0

Catel does not provide base classes for Entity Framework. EF is normally used in combination with SQL server databases. It cannot be used in combination with the SavableModelBase.

For more information, see the official documentation:

https://catelproject.atlassian.net/wiki/display/CTL/Catel.Extensions.EntityFramework5

Geert van Horrik
  • 5,689
  • 1
  • 18
  • 32