Code Monkey home page Code Monkey logo

Comments (7)

pwelter34 avatar pwelter34 commented on May 18, 2024

This is a good idea. I'll work to get support for a {Schema} variable added

from entityframeworkcore.generator.

BartBr avatar BartBr commented on May 18, 2024

Hi, I tried using schema as a variable as you suggested.
I found this to be very difficult to get right.

The naming should only be a unique per namespace. example: Shema1.Person should not conflict with Schema2.Person, which I think is the whole point of this feature.

Instead of using a variable I set added an option: "AddSchemaToNamespace"

You can check my changes here:
BartBr@7a9cc2f

from entityframeworkcore.generator.

gratik avatar gratik commented on May 18, 2024

Looking through the changes you suggested that is exactly what I was looking for, we have a number of tables that are identical in name but differ only by schema and keeping them in separate folders and namespaces would allow for us to use this generator, without resorting to separate contexts or using the prefix schema option, I really hope this is accepted.

from entityframeworkcore.generator.

BartBr avatar BartBr commented on May 18, 2024

I created the PR #99

from entityframeworkcore.generator.

BartBr avatar BartBr commented on May 18, 2024

@pwelter34 Hi Paul, could you take a look at my pull request #99?
By any means this feature meant to be nonintrusive, if you don't enable this feature, it has no effect on the rest of the program.

Thanks

from entityframeworkcore.generator.

pwelter34 avatar pwelter34 commented on May 18, 2024

thanks for reminder. i'll take a look this weekend.

from entityframeworkcore.generator.

pwelter34 avatar pwelter34 commented on May 18, 2024

This is implemented in v3

To use the schema in a namespace, directory or class name use the new {Table.Schema} variable in the configuration file.

Documentation: https://efg.loresoft.com/en/latest/variables/\
Sample: https://github.com/loresoft/EntityFrameworkCore.Generator/tree/master/sample/TrackerSchema/TrackerSchema.Core

from entityframeworkcore.generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.