I created a project in Visual Studio 2012 Web Express. After that I included an EDMX file and updated it with database generated models. Now when I perform a build, Visual Studio lists down alot of errors all relating to the piece of code I have written below.
The compiler points the following as errors When I open the Model class. This is the auto generated model class.
namespace Mvc
{
using System;
using System.Collections.Generic;
public partial class MyTableName
{
public MyTableName()
{
The moment I move using statement outside the namespace as follows, the errors get resolved.
using System;
using System.Collections.Generic;
namespace Mvc
{
public partial class MyTableName
{
public MyTableName()
{
I havent faced this issue before and what I performed is simply out of the box. Any clue whats going wrong?
Oops! Looks like the database had a table with a reserved C# class name. Issue Resolved.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.