Print Page | Close Window

Validate in EntitymanagerDelegate

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3946
Printed Date: 09-May-2024 at 10:24pm


Topic: Validate in EntitymanagerDelegate
Posted By: jkattestaart
Subject: Validate in EntitymanagerDelegate
Date Posted: 25-Jan-2013 at 7:35am
Hello,
 
I started a new cocktail development on an existing SQL Server database.
Everything looks ok, but i wondered what to do with the Validate in EntityManagerDelegate.
In the Code First this calls the Virtual Validate in the EntityBase, but for my solutions my entities are generated from the EntityModel. What is the best way to do this. Add an interface in my partial class for the entities: IEntityBase?
I suppose you do want to add some extra validation there.
 



Replies:
Posted By: mgood
Date Posted: 25-Jan-2013 at 9:28am
You can still add a base class as documented here and do it similar to how it's done with code first.

http://drc.ideablade.com/devforce-2012/bin/view/Documentation/model-custom-base-class


Posted By: jkattestaart
Date Posted: 25-Jan-2013 at 12:08pm
Thanks Marcel for your quick reply.


Posted By: jkattestaart
Date Posted: 25-Jan-2013 at 1:03pm
When i introduce the Entitybase injection it generates OK, but when i build the following errors is reported.
 
Error 27 An error occurred during metadata generation and a metadata file could not be created.  Error: Unable to find the requested .Net Framework Data Provider.  It may not be installed. C:\Users\JKT\Documents\Visual Studio 2010\Projects\AccoBooking\packages\IdeaBlade.DevForce-2010.Aop.6.1.9
\tools\IdeaBlade.DevForce.Common.targets 110 5 DomainModel
When I remove the injected EntityBase the error disappears. I don't understand this.
 
 


Posted By: mgood
Date Posted: 26-Jan-2013 at 2:41am
You appear to have the DevForce 2010 Code-First NuGet package installed to your project. Since your model is not code-first you should uninstall the Code-First package.


Posted By: jkattestaart
Date Posted: 26-Jan-2013 at 2:48am
Yes forgot about that DevForce CF link. Thanks Marcel!



Print Page | Close Window