zzzprojects / EntityFramework-Effort

Entity Framework Effort is a powerful tool that enables a convenient way to create automated tests for Entity Framework based applications.
https://entityframework-effort.net/
MIT License
431 stars 99 forks source link

Load CSV data for same table name (different structure) in different schema #178

Closed midway500 closed 5 years ago

midway500 commented 5 years ago

Description

We have a need to load the database via CSV for the same table name (with different structure) for different schema. When I am trying to use the CSV file name as Schema_TableName.csv but it does not work. Sometimes, it tries to load the data intended for one schema into another and causes error.

JonathanMagnan commented 5 years ago

Hello @midway500 ,

Do you think you could provide a project sample with this issue?

It will help my developer investigate the issue more efficiently.

We now always ask for a project sample even if the issue is easy to reproduce. As a free product, we must find some way to save time to offer an overall better experience for everyone and release fixes faster.

You can send it to: info@zzzprojects.com if you need to keep the source private

Best Regards,

Jonathan


Performance Libraries context.BulkInsert(list, options => options.BatchSize = 1000); Entity Framework ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation Eval.Execute("x + y", new {x = 1, y = 2}); // return 3 C# Eval FunctionSQL Eval Function

midway500 commented 5 years ago

Thanks for replying. I will provide a project sample.

JonathanMagnan commented 5 years ago

Hello @midway500 ,

I believe we never got the project.

We will close the issue but feel free to provide the project anytime and we will re-open it.

midway500 commented 5 years ago

@JonathanMagnan, please re-open the ticket.

I have sent a sample project to info@zzzprojects.com

Go to the Sample.Effort.UnitTest project and run the TestMethod in UnitTest1. The test will fail with error:

Message: Test method Sample.Effort.UnitTest.UnitTest1.TestMethod1 threw exception: Effort.Exceptions.EffortException: Unhandled exception while trying to initialize the content of 'Table' table ---> Effort.Exceptions.EffortException: An unhandled exception occurred while trying to assign value '1/1/2000 12:00:00 AM' to Property 'Column1' of type 'System.Int32' during entity initialization for table 'Effort.Internal.DbManagement.Schema.TableName' ---> System.InvalidCastException: Specified cast is not valid.

JonathanMagnan commented 5 years ago

Hello @midway500 ,

Sorry for the delay, my developer finally got time to look at it.

Could you try the v2.2.4 and let us know if everything works as expected in this version?

Best Regards,

Jonathan

midway500 commented 5 years ago

Will give it a try.

midway500 commented 5 years ago

Version 2.2.4 corrects my issue. Thank you so much.