خرید بک لینک

Vote count: 0

In MVC 5 with EF 6.1 for migration i did below steps to update my database:

  1. in PMC Enable-Migrations -ContextTypeName [SiteDbContext] ( i have two DbContext in my project)
  2. Set AutomaticMigrationsEnabled to true in Configuration file in migration folder.
  3. Modifying my class from

    [Required(ErrorMessageResourceName = "ContextFaRequired", ErrorMessageResourceType = typeof(Resources.Resources))]
    [MaxLength(10000, ErrorMessageResourceName = "ContextFaLong", ErrorMessageResourceType = typeof(Resources.Resources))]
    [Display(Name = "ContextFa", ResourceType = typeof(Resources.Resources))]
    [DataType(DataType.Text)]
    public string ContextFa  { get; set; }
    
    

to

    [Display(Name = "ContextFa", ResourceType = typeof(Resources.Resources))]
    [DataType(DataType.Text)]
    public string ContextFa  { get; set; }

3.Build project

  1. in PMC Update-database.

update done and i can see changes applied in database, but now when i try to access modified table i get this error: "Caot resolve Collation conflict .."

asked 27 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 10 تير 1395 ساعت: 20:47

صفحه بندی