SecurityDataContext - (First CSLA/Linq application) - Chapter 18

SecurityDataContext - (First CSLA/Linq application) - Chapter 18

Old forum URL: forums.lhotka.net/forums/t/5851.aspx


William.Hullsiek posted on Friday, November 21, 2008

I am working on my first CSLA application using the new 3.6 release and the 'alpha' copy of the VS-2008 book. 

PTTracker is working as advertised along with PTWeb.  Great learning tool - reminds of Kernghan and Plauger Software Tools.

Have created my Security.dbml for the Dal and "copied code" from  PTIdentity and PTPrincipal into my application.  I then dragged [dbo].[Users] and [dbo].[Roles] from a test copy of my production SQL-Server 2005 database (not SQL-Express)  The stored procedures (uspCSLA_<Method>) were dragged into the methods area of dbml.

Encountering a problem in the Identity class in the DataPortal_Fetch methods: ContextManager<SecurityDataContext>. 

The type 'Application.DalLinq.Security.SecurityDataContext' cannot be used as type parameter 'C' in the generic type or method 'Csla.Data.ContextManager<C>'. There is no implicit reference conversion from 'Application.DalLinq.Security.SecurityDataContext' to 'System.Data.Linq.DataContext'.

What step did I miss?  

 

 

 

 

 

 

William.Hullsiek replied on Tuesday, November 25, 2008

Problem was resolved by removing the CSLA reference and adding it back in again. 

MikeMcClintock replied on Friday, May 29, 2009

I'm having this same problem.  I removed and readded the CSLA reference, but that didn't help.

GetManager works, but the context can't convert.

 

MikeMcClintock replied on Friday, May 29, 2009

Added reference to system.data.linq

 

All is good.

Copyright (c) Marimer LLC