Quantcast
Channel: EntityFramework Reverse POCO Code First Generator
Viewing all 1642 articles
Browse latest View live

Edited Issue: remove "Elements.StoredProcedures" causes build errors [166]

$
0
0
If you remove "Elements.StoredProcedures" from "ElementsToGenerate = Elements.Poco | Elements.Context | Elements.UnitOfWork | Elements.PocoConfiguration | Elements.StoredProcedures;", the following using statements are removed from the generated file: using System.Data.SqlClient;
using System.Data.SqlTypes;. But there are still functions that reference them in the generated file. Either you have to manually add them back in or leave "Elements.StoredProcedures" in the ElementsToGenerate.

Commented Issue: remove "Elements.StoredProcedures" causes build errors [166]

$
0
0
If you remove "Elements.StoredProcedures" from "ElementsToGenerate = Elements.Poco | Elements.Context | Elements.UnitOfWork | Elements.PocoConfiguration | Elements.StoredProcedures;", the following using statements are removed from the generated file: using System.Data.SqlClient;
using System.Data.SqlTypes;. But there are still functions that reference them in the generated file. Either you have to manually add them back in or leave "Elements.StoredProcedures" in the ElementsToGenerate.
Comments: Thanks. I'll get this fixed.

Edited Issue: remove "Elements.StoredProcedures" causes build errors [166]

$
0
0
If you remove "Elements.StoredProcedures" from "ElementsToGenerate = Elements.Poco | Elements.Context | Elements.UnitOfWork | Elements.PocoConfiguration | Elements.StoredProcedures;", the following using statements are removed from the generated file: using System.Data.SqlClient;
using System.Data.SqlTypes;. But there are still functions that reference them in the generated file. Either you have to manually add them back in or leave "Elements.StoredProcedures" in the ElementsToGenerate.

Commented Issue: remove "Elements.StoredProcedures" causes build errors [166]

$
0
0
If you remove "Elements.StoredProcedures" from "ElementsToGenerate = Elements.Poco | Elements.Context | Elements.UnitOfWork | Elements.PocoConfiguration | Elements.StoredProcedures;", the following using statements are removed from the generated file: using System.Data.SqlClient;
using System.Data.SqlTypes;. But there are still functions that reference them in the generated file. Either you have to manually add them back in or leave "Elements.StoredProcedures" in the ElementsToGenerate.
Comments: Fixed. This will be in the next release. See this [changeset](https://efreversepoco.codeplex.com/SourceControl/changeset/e00d5f491abe)

Commented Issue: remove "Elements.StoredProcedures" causes build errors [166]

$
0
0
If you remove "Elements.StoredProcedures" from "ElementsToGenerate = Elements.Poco | Elements.Context | Elements.UnitOfWork | Elements.PocoConfiguration | Elements.StoredProcedures;", the following using statements are removed from the generated file: using System.Data.SqlClient;
using System.Data.SqlTypes;. But there are still functions that reference them in the generated file. Either you have to manually add them back in or leave "Elements.StoredProcedures" in the ElementsToGenerate.
Comments: and this [changeset](https://efreversepoco.codeplex.com/SourceControl/changeset/68a43d242dce)

Commented Issue: remove "Elements.StoredProcedures" causes build errors [166]

$
0
0
If you remove "Elements.StoredProcedures" from "ElementsToGenerate = Elements.Poco | Elements.Context | Elements.UnitOfWork | Elements.PocoConfiguration | Elements.StoredProcedures;", the following using statements are removed from the generated file: using System.Data.SqlClient;
using System.Data.SqlTypes;. But there are still functions that reference them in the generated file. Either you have to manually add them back in or leave "Elements.StoredProcedures" in the ElementsToGenerate.
Comments: Thanks.

New Post: Circular reference

$
0
0
Maybe I am missing something obvious but I am having problems with several circular references in my entities. I am filtering out a lot of our reverse navigation properties per this, https://efreversepoco.codeplex.com/workitem/157, and it all seems to generate well. I am disabling lazy loading in my repository before any calls are made.
_context.Configuration.LazyLoadingEnabled = false;
But still have circular references.

Any suggestions?


Thanks
Andy

Source code checked in, #e00d5f491abe

$
0
0
Case 166. Remove "Elements.StoredProcedures" causes build errors.

Source code checked in, #68a43d242dce

$
0
0
Case 166. Remove "Elements.StoredProcedures" causes build errors.

New Post: Hi There

$
0
0
Hey there, a cordial greeting.

Allow me before anything else congratulate you for your excellent work and for nonprofit sharing with the crowd and also I want to let you know that it is an excellent and precise working tool.

How I can control the namespace in which classes are generated? I mean, I have a space of predetermined names and want to use this for all classes that are generated. I'm noticing that classes that are generated appear with the namespace that corresponds to the newly created folder. Is there any way to control this behavior I am reverse engineering more than 1000 tables and change manually all namespaces is tedious.

Thank you. Best regards

Source code checked in, #86bb970b3769

New Post: Circular reference

$
0
0
Are you trying to serialise the objects using newton soft JSON?

New Post: Hi There

$
0
0
Hi
Thanks for the kind words :)

at the top of your settings tt file, there is a commented out line:
// Namespace = ""; // Override the default namespace here
Uncomment it, and change it to the namespace you would like. For example:
Namespace = "MyProject.Data"; // Override the default namespace here
Another way is to move the .tt, and the two *.ttinclude files to a sub-folder within your project.

New Post: Circular reference

$
0
0
No, these objects are not being serialized, if I do use Newtonsoft Json I am able to get the output that I would expect by setting the [JsonIgnore] on the Foreign Keys. But even with lazy loading set to false the objects that are being generated are not as expected.

Example, A One to Many, Manufactures and Models. In my repository for a get all query I explicitly load the Models when I pull the Manufactures using the include statement with the query. When I inspect the object it is correctly including each model that is assigned to that manufacture but it is also including a nav property back to the Manufacture with in the child Model object. And within that Manufacture object link it is including another link to a list of Models and so on and so on……..

I am looking for a way to stop the recursive loading of all of the child objects more than 1 level deep. I thought that lazy loading, proxy creation, and automatic change tracking would take care of that but it has not. I can include a database diagram and the objects if I am not making any sense, and that is a very good possibility.

New Post: Circular reference

$
0
0
I understand Andy.
lol @ "if I am not making any sense, and that is a very good possibility. "

I found this if its any help, although I suspect you have already tried that?
Instead of using the Inculde method you could use Load. Worth a try.

New Post: Circular reference

$
0
0
Yep I had taken a look at that route, not that post tho. It is a little more in depth than the ones that I had found. I was trying to avoid it it being that I am using an generic repository.

I am thinking that I am going to change my direction a little and move to pushing the entities with a Json Web API controller. It was the what I was originally moving toward but wanted to explore this option first.

And just for anyone else that is having problems with recursive loading in you objects, make sure that "AutoDetectChangesEnabled = false" in your context configuration. If it is not and you reuse a context that you previously included related objects in then it will pull them from local cache and included them into future queries. Causes a little bit of a headache being that depending on the order of the query you can get different shaped data.

Lastly, thanks for the great extension, it has saved untold hours of writing boiler plate code for an database that is changing constantly in development. I am going to keep using it to generate my POCO objects to share my model with the other projects.

Thanks
Andy

Source code checked in, #41bb66b20d0f

$
0
0
Allow mapping tables with spaces as they are valid within Entity Framework

Source code checked in, #41725c939d19

$
0
0
Prevent the use of tables which contain periods as these are invalid within entity framework

Created Unassigned: Column filter doesn't exclude full column names as I expect [167]

$
0
0
Hi,

I have a column called DateCreated in a table called Products.SupplierProduct - I don't want this attribute to show up in the POCO.

When I set the column filter to:

ColumnFilterExclude = new Regex("^Products.SupplierProduct.DateCreated$");

It still adds the column. But when I place the schema after the table name, like so:

ColumnFilterExclude = new Regex("^SupplierProduct.Products.DateCreated$");

It works.

Shouldn't it be [schema_name].[table_name].[column_name]?

Source code checked in, #23656ea97117

$
0
0
Case 167. Fix ColumnFilter fully qualified name check is schema.table.columnName. Thanks to AndyGJP.
Viewing all 1642 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>