Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkRead throw exception "There is already an object named '#TableTemp78fdb037' in the database" #130

Closed
alansousa opened this issue Jan 4, 2019 · 3 comments

Comments

@alansousa
Copy link

When I tried to use BulkRead to my class Order, like this, its works:

public class Order
{
    public int StatusId {get;set; }
    public DateTime StatusUpdated {get;set;}
}

But when I change to use a ValueObject, like this:

public class Order
{
    public Status Status {get;set; }
}

public class Status
{
    public int StatusId {get;set; }
    public DateTime StatusUpdated {get;set;}
}

BulkRead throw exception "There is already an object named '#TableTemp78fdb037' in the database"

I've tried with TempDB true and false, and got the same exception.

@borisdj
Copy link
Owner

borisdj commented Jan 4, 2019

When using TempDB you should put BulkRead inside transaction:
There is remark about this in README:

UseTempDB when set then BulkOperation has to be inside inside Transaction.

If the issue still remains for reproducing it, please write entire code of these Entity classes, than code of OnModelCreating method if columns have some custom config there and also code how you called BulkRead.

@alansousa
Copy link
Author

I posted the example with TempDB, but I tried with and without tempDB and got the same error.

@borisdj
Copy link
Owner

borisdj commented Jan 10, 2019

Then post all code for reproducing this:

If the issue still remains for reproducing it, please write entire code of these Entity classes, than code of OnModelCreating method if columns have some custom config there and also code how you called BulkRead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants