EntityFramework Case Sensitivity Classes, Properties — oracle-tech

    Forum Stats

  • 3,715,657 Users
  • 2,242,821 Discussions
  • 7,845,481 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

EntityFramework Case Sensitivity Classes, Properties

user13799826
user13799826 Member Posts: 1
edited May 2019 in ODP.NET

I have been looking but can't seem to find a solution to this problem... Is it possible for EF to be case insensitive when using Oracle? Our application supports both SQL Server and Oracle.

Something similar to this: https://docs.oracle.com/cd/E11882_01/win.112/e23174/OracleCommandBuilderClass.htm#CHDCIFDH

This is currently what we have to reuse models for both databases:[Table("TABLENAME")]    
public class MyClass    
{        
     [Key]        
     [Column("PROPERTY1")]        
     public int Propert1 { get; set; }        
     [Column("PROPERTY2")]        
     public string Property2 { get; set; }        
     [Column("PROPERTY3")]        
     public bool Property3 { get; set; }        
     [Column("PROPERTY4")]        
     public DateTime Property4 { get; set; }



This currently works with both database types because when using EF with SQL Server it is case insensitive. Ideally, we would avoid having to use the Column and Table attributes.
If I don't have the Table and Column attributes, it will inform me that the entity/object does not exist.

Anyways, I was just curious if there is a solution to my problem! I appreciate you taking the time to read this!

Chris        
Sign In or Register to comment.