I made an example in Entity 5.0
and with 1 layer worked perfect.
Now I have separated in UI
and DA
L, but this is giving error. The same page that worked on the DAL
layer when done in UI
is giving error.
I think it's a lack of reference.
The error is:
Server Error in '/' Application.
Unable to load the specified metadata resource.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.MetadataException: Unable to load the specified metadata resource.
Source Error:
Line 41: using (var ctx = new DAL.TracesEntities())
Line 42: {
Line 43: var lambda = ctx.Traces.Where(q => q.DataBaseName == "megacorretor" || q.DataBaseName == "stats_mega")
Line 44: .GroupBy(a => new { a.TextData, a.DataBaseName })
Line 45: .Select(b => new { ...
I made reference to the DAL project and the DLL:
packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll
I do not remember if I should copy some .tt
something to UI
to work. Strange that interlisense in UI
works perfectly with entity
of DAL