ExtendedMemberShipProvider and EF5 issue in getting user profile

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
chlebta
Posts: 4
Joined: Wed 16 Apr 2014 22:48

ExtendedMemberShipProvider and EF5 issue in getting user profile

Post by chlebta » Sat 07 Jun 2014 16:06

I'm using Devart Extended MemberShip Provider For Oracle in my ASP.net MVC and I want to get the UserProfile from my DataBase but I got this error :

the nclob type is not qualified with a namespace or alias. Only primitive types can be used without qualification.
At this line :

Code: Select all

UserProfile model = uc.UserProfiles // here
                            .Where(o =>o.UserName == id)
                            .First();
This is my Model :

Code: Select all

public class UsersContext : DbContext
{
    public UsersContext()
        : base("DefaultConnection")
    {

    }

    public DbSet<UserProfile> UserProfiles { get; set; }
}

[Table("USERPROFILE")]
public class UserProfile
{
    [Key]
    [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
    public int UserId { get; set; }
    public string UserName { get; set; }
    public string Email { get; set; }
    public string Name { get; set; }
    public string Num { get; set; }
}
And this is my web.confiig :

Code: Select all

<add name="DefaultConnection" connectionString="User Id=devart;Password=1234;Data Source=localhost:1521"
      providerName="Devart.Data.Oracle" />
How to Fix it please?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: ExtendedMemberShipProvider and EF5 issue in getting user profile

Post by Shalex » Mon 09 Jun 2014 09:06

Please try setting this option in the code explicitly before the first usage of your context:

Code: Select all

    var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
    config.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = true;
If this doesn't help:
1) send us a small test project so that we can reproduce the issue in our environment
2) specify the exact (x.x.x) build of your dotConnect for Oracle

Post Reply