0

Firstly, I checked other answers in the website, but I couldn't find a solution. I have an ASP.NET MVC 5 project which is EF code first. I have Is class, in this class I have this :

  [UIHint("YerGorme")]
  public virtual YerGorme IliskiliYerGorme { get; set; }

And in YerGorme class I have this :

[Display(ResourceType = typeof(Resources), Name = "YerGorme_MahalindekiDegerlemeCinsi_Mahalindeki_Değerleme_Cinsi")]
public int MahalindekiCinsi { get; set; }

When I run the code I get this exception:

Invalid column name 'MahalindekiCinsi'.

Can you tell me what to do to get rid of this exception? Thanks.

4
  • Are you using code first? Is the database already created and the column doesn't exist? Also, change the g in Degerleme to a Latin g. Commented Jul 13, 2016 at 5:22
  • @Ted, Yes I'm using code first and database already created. I don't know if the column doesn't exist because I can't reach the db. Commented Jul 13, 2016 at 5:24
  • What do you mean can't reach the dB? Open server explorer in visual studio and check the SQL server that your connection string refers to. Commented Jul 13, 2016 at 5:26
  • use YerGorme_MahalindekiDegerlemeCinsi_Mahalindeki_Değerleme_Cinsi instead of 'MahalindekiCinsi ' Commented Jul 13, 2016 at 5:30

1 Answer 1

1

You can not use Ğ for column name.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.