Lasse Edsvik
Lasse Edsvik

Reputation: 9298

Ambiguity with class and model

I'm trying to define a "Product"-class for my model (.edmx), and I have it in the same folder as the model.

I get: Ambiguity between 'MVCTest.Models.Product.ProductID' and 'MVCTest.Models.Product.ProductID' error

What's needed to do so I can define my classes correctly?

/M

Upvotes: 0

Views: 347

Answers (2)

Dan Atkinson
Dan Atkinson

Reputation: 11728

You could always separate out by namespace. Have one class in one namespace. Although having the same class with the same properties is a bit unusual, and suggests that you need to refactor and create some form of inheritance as griegs suggested.

Upvotes: 0

griegs
griegs

Reputation: 22760

Have you tried using "Partial class"? Only really appropriate if it's an extension of the product class I guess.

If this is not what you were looking for then let us know with more information or even code snippets.

Upvotes: 2

Related Questions