a funny problem ... i can't understand it..
let me show you what i have first :
'D:\ReportsOfficesSystem\ReportsOfficesBLL\BaseController.vb'
^ ^ ^
solution project a vb class file
and
'D:\ReportsOfficesSystem\ReportsOfficesDAL\ReportsOfficesEntities.vb'
^ ^ ^
the same solution an other project a vb class file
in ReportsOfficesEntities.vb
:
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Web
Namespace ReportsOfficesModel
Partial Class ReportsOfficesEntities
Public Shared ReadOnly Property db() As ReportsOfficesEntities
Get
If HttpContext.Current IsNot Nothing Then
If HttpContext.Current.Session("context") Is Nothing Then
HttpContext.Current.Session.Add("context", New ReportsOfficesEntities())
End If
Return TryCast(HttpContext.Current.Session("context"), ReportsOfficesEntities)
Else
Return New ReportsOfficesEntities()
End If
End Get
End Property
End Class
End Namespace
in BaseController.vb
:
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports ReportsOfficesDAL.ReportsOfficesModel
Imports System.Web
Namespace ReportsOfficesBLL
Public Class BaseController
Protected db As ReportsOfficesEntities = ReportsOfficesEntities.db
Protected MultiEntity As Boolean = False
Public Sub Save()
db.SaveChanges()
End Sub
Public Sub Rollback(ByVal entity As [Object])
db.Refresh(System.Data.Objects.RefreshMode.StoreWins, entity)
End Sub
End Class
End Namespace
and of course i added the references for both projects...
the error in BaseController.vb
:
'ReportsOfficesDAL.ReportsOfficesModel.ReportsOfficesEntities' is not accessible in this context because it is 'Friend'.
i checked the whole code ..wondering if i am missing something ... nothing!
searched -->
1: maybe it is different a littel... i don't know
2:i am not sure if it is the same issue .. and it looks complicated to me..
note: i copy (Convert) that from C#.net project and it is working just fine in (C#.net)....!
Thanks in advance.