title: Entity Framework class type property to snake case
body: <p>I want to map <code>Location</code> of type <code>RoomLocation</code> to </p>
  
  <pre><code>Floor -&gt; location_floor,
  Building -&gt; location_building,
  Room -&gt; location_room
  </code></pre>
  
  <p><code>Room.cs</code></p>
  
  <pre><code>public class Room
  {
      [Key]
      public Guid Id { get; set; }
      public string Title { get; set; }
      public RoomLocation Location { get; set; }
  
      public DateTime CreationDate { get; set; }
      public DateTime ModificationDate { get; set; }  
  }
  
  public class RoomLocation
  {
      public int Floor { get; set; }
      public int Building { get; set; }
      public int Room { get; set; }
  }
  </code></pre>
  
  <h1>Database Diagram</h1>
  
  <p><img src="https://i.stack.imgur.com/E11Fx.png" alt="Database diagram"></p>
  
  <p>Note: in an older project I forgot to add a <code>builder.HasKey</code> and it actually worked I looked at the logs and Entity Framework translated the query to <code>user_</code> now because I forgot what exactly happened I can't redo the situation.</p>
  
  <p>I'm using Entity Framework with <code>Npgsql</code> with SnakeCaseNamingConvention.</p>