I'm following the plugin with data guide here, and in the Object Context class, when I try to implement the Set function from the Nop.Data.IDbContext it tells me this:
Class 'ProductDesignerObjectContext' must implement 'Function Set(Of TEntity As Core.BaseEntity)() As System.Data.Entity.IDbSet(Of TEntity)' for interface 'Data.IDbContext'.
I've tried both:
Public Shadows Function [Set](Of TEntity As Core.BaseEntity)() As System.Data.Entity.IDbSet(Of TEntity) Implements Nop.Data.IDbContext.Set
Return MyBase.Set(Of TEntity)()
End Function
and
Public Shadows Function [Set](Of TEntity As Core.BaseEntity)() As System.Data.Entity.IDbSet(Of TEntity)
Return MyBase.Set(Of TEntity)()
End Function
The funny thing is that when I do the first one, VS complains that IDbContext has no function named "Set", which is weird, because, I can see it there.
I'm just wondering if there's something gone hazy in my C# to VB.NET translation.
here's the whole class:
Imports System
Imports System.Collections.Generic
Imports System.Data.Entity
Imports System.Data.Entity.Infrastructure
Imports Nop.Core
Imports Nop.Data
Namespace Data '<-- Nop.Plugin.Misc.ProductDesigner.Data
Public Class ProductDesignerObjectContext
Inherits DbContext
Implements IDbContext
Public Function ExecuteStoredProcedureList(Of TEntity As {New, Core.BaseEntity})(commandText As String, ParamArray parameters() As Object) As System.Collections.Generic.IList(Of TEntity) Implements IDbContext.ExecuteStoredProcedureList
End Function
Public Shadows Function SaveChanges() As Integer Implements IDbContext.SaveChanges
End Function
Public Shadows Function [Set](Of TEntity As Core.BaseEntity)() As System.Data.Entity.IDbSet(Of TEntity) Implements Nop.Data.IDbContext.[Set]
Return MyBase.Set(Of TEntity)()
End Function
End Class
End Namespace