Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在visual studio 2015中显示实体中的阿拉伯字符时出错_C#_Asp.net Mvc_Visual Studio 2015 - Fatal编程技术网

C# 在visual studio 2015中显示实体中的阿拉伯字符时出错

C# 在visual studio 2015中显示实体中的阿拉伯字符时出错,c#,asp.net-mvc,visual-studio-2015,C#,Asp.net Mvc,Visual Studio 2015,当我使用visual studio 2013显示阿拉伯字符时,阿拉伯字符会正确显示,但当我使用visual studio 2015时,如果我使用实体类,阿拉伯字符会显示为奇怪字符(嫙ÌæÚ),但如果我使用模型,阿拉伯字符会正确显示。visual studio 2015中的实体有什么问题 namespace SimpleIAP { using System; using System.Collections.Generic; using System.ComponentModel; using S

当我使用visual studio 2013显示阿拉伯字符时,阿拉伯字符会正确显示,但当我使用visual studio 2015时,如果我使用实体类,阿拉伯字符会显示为奇怪字符(嫙ÌæÚ),但如果我使用模型,阿拉伯字符会正确显示。visual studio 2015中的实体有什么问题

namespace SimpleIAP
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

public partial class tblProduct
{
    public tblProduct()
    {
        this.tblPurchaseDetails = new HashSet<tblPurchaseDetail>();
        this.tblProductOpeningBalances = new HashSet<tblProductOpeningBalance>();
        this.tblSalesInvoiceDetails = new HashSet<tblSalesInvoiceDetail>();
        this.tblStores = new HashSet<tblStore>();
    }

    [Key]
    [DisplayName("رقم المنتج")]
    public int ProductID { get; set; }

    [Required(ErrorMessage = "مطلوب")]
    [DisplayName("اسم المنتج")]
    public string Name { get; set; }

    [Required(ErrorMessage = "مطلوب")]
    [DisplayName("المجموعة")]
    [ForeignKey("tblCategory")]
    public int CategoryID_FK { get; set; }

    [DisplayName("الوصف")]
    public string Description { get; set; }

    [DisplayName("حد إعادة الطلب")]
    [RegularExpression("^[0-9]+$", ErrorMessage = "أرقام فقط")]
    public int ReOrderLimit { get; set; }

    [DisplayName("سعر القطاعى")]
    [RegularExpression(@"(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)", ErrorMessage = "أرقام فقط")]
    public decimal PriceRetail { get; set; }

    [DisplayName("سعر الجملة")]
    [RegularExpression(@"(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)", ErrorMessage = "أرقام فقط")]
    public decimal PriceWholeSale { get; set; }

    public virtual tblCategory tblCategory { get; set; }
    public virtual ICollection<tblStore> tblStores { get; set; }
    public virtual ICollection<tblPurchaseDetail> tblPurchaseDetails { get; set; }
    public virtual ICollection<tblSalesInvoiceDetail> tblSalesInvoiceDetails { get; set; }
    public virtual ICollection<tblProductOpeningBalance> tblProductOpeningBalances { get; set; }
    }
}
名称空间simpleap
{
使用制度;
使用System.Collections.Generic;
使用系统组件模型;
使用System.ComponentModel.DataAnnotations;
使用System.ComponentModel.DataAnnotations.Schema;
公共部分类tblProduct
{
公共tblProduct()
{
this.tblPurchaseDetails=new HashSet();
this.tblProductOpeningBalances=new HashSet();
this.tblSalesInvoiceDetails=new HashSet();
this.tblStores=new HashSet();
}
[关键]
[显示名称(“قمامن㶤”)]
public int ProductID{get;set;}
[必需(ErrorMessage=“مطلوب”)]
[显示名称(“显示名称”)]
公共字符串名称{get;set;}
[必需(ErrorMessage=“مطلوب”)]
[显示名称(“显示名称”)
[外键(“TBL类别”)]
public int CategoryID_FK{get;set;}
[显示名称(“الوف”)]
公共字符串说明{get;set;}
[显示名称(“显示名称”)]
[正则表达式(“^[0-9]+$”,ErrorMessage=“أاممفط”)]
public int ReOrderLimit{get;set;}
[显示名称(“显示名称”)]
[RegularExpression(@“(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)”,ErrorMessage=“أ(1601; 1605;)]]
公共十进制价格零售{get;set;}
[显示名称(“显示名称”)]
[RegularExpression(@“(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)”,ErrorMessage=“أ(1601; 1605;)]]
公共十进制价格{get;set;}
公共虚拟tblCategory tblCategory{get;set;}
公共虚拟ICollection tblStores{get;set;}
公共虚拟ICollection tblPurchaseDetails{get;set;}
公共虚拟ICollection tblSalesInvoiceDetails{get;set;}
公共虚拟ICollection tblProductOpeningBalances{get;set;}
}
}

哪一个显示不正确?数据注释属性中的问题或数据库中存储的其他问题?该问题不是mvc或asp.net问题。检查此fiddle()是否仅在VS中,还是在您运行代码时?感谢您的回复,我的实体中代码第一类中的数据注释中的注释出现了问题。问题发生在运行代码时,但在visual studio中看起来都很好,但在vs2013中,代码在VS和运行代码时都很好