[英]Entity Framework from Database Generate Namespace Errors
我正在从数据库生成EF模型,并且在EF生成的所有类的自动生成的代码中使用了名称空间错误。
这是其中一个类的示例:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebApplication5.Models
{
using System;
using System.Collections.Generic;
public partial class Flag
{
public int ID { get; set; }
public string Type { get; set; }
public int UserGameID { get; set; }
public virtual UserGame UserGame { get; set; }
}
}
我在构建时遇到以下错误:
using名称空间指令只能应用于名称空间。 “系统”是类型而不是名称空间
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.