You've got this completely wrong. You don't need the Configuration class at all for such a simple relationship.
I'm assuming your Room class looks something like this:
public class Room
{
[Key]
public int RoomId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
Your User class should look like this:
public class User
{
[Key]
public int UserId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Gender { get; set; }
public string Telephone { get; set; }
public string Mail { get; set; }
public string TcNo { get; set; }
public virtual Room Room { get; set; }
}
Again, no configuration class is required. The Room will automatically be optional.
You also don't really need the Key attributes, because the Id name matches the class name appended with "Id". I just put them in there because I like to be more "documenting" in my code and less "convention".