Error displaying Arabic characters from an object in visual studio 2015

When I use visual studio 2013 to display Arabic characters, they are displayed correctly, but when I use visual studio 2015, Arabic characters are displayed with strange characters (ÇáãÌææÉÉ) if I use entity classes, but if I use the Arabic character model are displayed correctly. What is wrong with the object in 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; }
    }
}

enter image description here

+4
source share

Source: https://habr.com/ru/post/1620000/


All Articles