Comments (1)
I'm not entirely sure the advantage of this in this case.
We don't (generally) need to modify or inject any code into existing classes etc. It just adds code to be compiled based on the EDMX. It also doesn't need to do it on every build - just if the EDMX changes. The current method of creating the source files to inject allows for short circuiting of the generation from MSBuild etc.
I guess the only thing that could be useful for, is to find the namespace for the DbContext class. The Edmx file only has the class name, not the namespace, and the DbMappingViewCacheTypeAttribute
requires the fully qualified name. However, there could be cases where multiple contexts exist in different namespaces etc. and the single entry in the proj file doesn't seem like a big issue.
What would be better, would be to use the System.CodeDom.Compiler.CodeDomProvider
classes to output the source file, and not have to have separate C# and VB.Net generators used.
I have a MSBuild task which does this for ResX resources (from EmbeddedResource
items) to generate the strongly typed accessor classes instead of using SingleFileGenerators.
This means I can override any setting for the Class using metadata on the EmbeddedResource
.
Most of the code for this project was based on the existing code in the Entity Framework 6 Power Tools Community Edition
so I didn't really work on how the output was generated, but certainly the CSharpViewGenerator and VBViewGenerator need some love and care.
Looking at the Source Generators cookbook - this scenario doesn't seem to fit, but if you can explain why/how it would work better, please let me know.
from c3d.msbuild.tools.ef6.generateviews.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c3d.msbuild.tools.ef6.generateviews.