{ "info": { "author": "Kristjan T\u00e4rk", "author_email": "kristjan.tark@eesti.ee", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Dotnet generate\n[![PyPI](https://img.shields.io/pypi/v/dotnet-generate.svg?style=flat-square)](https://pypi.org/project/dotnet-generate/)\n> Script generator for dotnet core 2.x\n\n\nTool for making it easier to generate MVC and API controllers in Asp.NET Core applications.\nHelps also with managing DB migrations and updates.\n\n## Installation\n\nI have tested it with Python 3.6 only\n\nInstall it via pip/pip3 `pip install dotnet-generate`.\n\n\n## Examples\n\nExamples executed in dotnet core 2.1 solution folder, with the following structure\n\n```\n\u251c\u2500\u2500 DAL\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 AppDbContext.cs\n\u251c\u2500\u2500 Domain\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 BaseEntity.cs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 Contact.cs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 ContactType.cs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 Domain.csproj\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 Identity\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 AppRole.cs\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 AppUser.cs\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 Person.cs\n\u2514\u2500\u2500 WebApp\n \u251c\u2500\u2500 Startup.cs\n \u251c\u2500\u2500 Program.cs\n ...\n```\n\n### Migrations\n\nTo make new migrations run:\n```\ndotnet-generate migrate MigrationName\n```\n\nMigrate command has some additional options:\n- `-u`, `-update` for updating DB to latest migration.\n- `-m`, `--mvc` for creating MVC controllers.\n- `-a`, `--api` for creating API controllers.\n- `-t`, `--try` this option runs the tool without actually executing any commands, instead it will print those commands to console.\n\nYou can also combine these flags, for example you can generate shell script with all the commands as follows:\n\n```\ndotnet-generate migrate MigrationName -umat > script.sh\n```\n\nWhich will produce the following script.sh\n\n```bash\ndotnet ef migrations add MigrationName --project DAL --startup-project WebApp\ndotnet ef database update --project DAL --startup-project WebApp\ncd WebApp/\ndotnet aspnet-codegenerator controller -name PersonsController -actions -m Person -dc AppDbContext -outDir Controllers --useDefaultLayout --useAsyncActions --referenceScriptLibraries -f\ndotnet aspnet-codegenerator controller -name ContactsController -actions -m Contact -dc AppDbContext -outDir Controllers --useDefaultLayout --useAsyncActions --referenceScriptLibraries -f\ndotnet aspnet-codegenerator controller -name ContactTypesController -actions -m ContactType -dc AppDbContext -outDir Controllers --useDefaultLayout --useAsyncActions --referenceScriptLibraries -f\ncd ../\ncd WebApp/\ndotnet aspnet-codegenerator controller -name PersonsController -actions -m Person -dc AppDbContext -outDir Api/Controllers -api --useAsyncActions -f\ndotnet aspnet-codegenerator controller -name ContactsController -actions -m Contact -dc AppDbContext -outDir Api/Controllers -api --useAsyncActions -f\ndotnet aspnet-codegenerator controller -name ContactTypesController -actions -m ContactType -dc AppDbContext -outDir Api/Controllers -api --useAsyncActions -f\ncd ../\n\n\n```\n\n### Db updating\n\nFor updating db run\n```\ndotnet-generate update\n```\n\n### MVC controllers.\n\nFor generating MVC controllers run\n```\ndotnet-generate mvc\n```\n\n### API controllers.\n\nFor generating API controllers run\n```\ndotnet-generate api\n```\n\n-----\n## Installation for local build\n\nIf you want to make this tool better,\nthen you can make local releases like this:\n\n1. Fork/Clone this project.\n2. Navigate to project dir.\n3. Edit the code.\n4. Install the CLI tool. `pip3 install --editable .`\n5. Check that tool is installed `dotnet-generate --help`\n6. If everything works, make new pull request?\n\n\n## Built with\n\n- [Click](https://github.com/pallets/click)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/eskumu/dotnet-generate", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dotnet-generate", "package_url": "https://pypi.org/project/dotnet-generate/", "platform": "", "project_url": "https://pypi.org/project/dotnet-generate/", "project_urls": { "Homepage": "https://gitlab.com/eskumu/dotnet-generate" }, "release_url": "https://pypi.org/project/dotnet-generate/0.5.0/", "requires_dist": [ "Click" ], "requires_python": "", "summary": "Tool for generating dotnet code", "version": "0.5.0" }, "last_serial": 4846486, "releases": { "0.4.3": [ { "comment_text": "", "digests": { "md5": "961b141aec6e93135dce003a0d15c75b", "sha256": "acd562c393b6f6825f93c3bfa9be4edaafad43c579d081018cec5c36719db548" }, "downloads": -1, "filename": "dotnet_generate-0.4.3-py3-none-any.whl", "has_sig": false, "md5_digest": "961b141aec6e93135dce003a0d15c75b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4749, "upload_time": "2019-02-19T19:38:18", "url": "https://files.pythonhosted.org/packages/0d/92/15688a65c46b57c0b3d8ede32c6f13db7d1a462365a40f1ad9f3f5c2bae3/dotnet_generate-0.4.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c661ed771e0b9d35f0ca9201099d1cb3", "sha256": "c88b4909b9fdb43c334deeea67d39d82e89ed71c231fc3346ec4bf82f84929eb" }, "downloads": -1, "filename": "dotnet-generate-0.4.3.tar.gz", "has_sig": false, "md5_digest": "c661ed771e0b9d35f0ca9201099d1cb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3598, "upload_time": "2019-02-19T19:38:20", "url": "https://files.pythonhosted.org/packages/5a/f0/563e0c1a2f7c03fb06484754e2730e26b412e80173fac6eae2f3d6795946/dotnet-generate-0.4.3.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "6efe6dffd34f6c049ce5f5a4ad9289f0", "sha256": "9ea8581f998cd37acdd891a01f523167c9391ed16366670144d49dbdf21c9f26" }, "downloads": -1, "filename": "dotnet_generate-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6efe6dffd34f6c049ce5f5a4ad9289f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4694, "upload_time": "2019-02-20T16:36:37", "url": "https://files.pythonhosted.org/packages/fe/a0/885ef5d3b43360d50c1045e7ba8808fb6c29ed2498257a4e00aeb4cdabbb/dotnet_generate-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f676125557a889e5cf4a59f970f0d3b8", "sha256": "794d955a8ee9da85d232ff42512de22d952583e7c0101f5e92481e9778f10c25" }, "downloads": -1, "filename": "dotnet-generate-0.5.0.tar.gz", "has_sig": false, "md5_digest": "f676125557a889e5cf4a59f970f0d3b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3465, "upload_time": "2019-02-20T16:36:38", "url": "https://files.pythonhosted.org/packages/3a/2b/25f4d589e98299f4ced38903732daca6ea0ae43724a7627abbae625adfda/dotnet-generate-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6efe6dffd34f6c049ce5f5a4ad9289f0", "sha256": "9ea8581f998cd37acdd891a01f523167c9391ed16366670144d49dbdf21c9f26" }, "downloads": -1, "filename": "dotnet_generate-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6efe6dffd34f6c049ce5f5a4ad9289f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4694, "upload_time": "2019-02-20T16:36:37", "url": "https://files.pythonhosted.org/packages/fe/a0/885ef5d3b43360d50c1045e7ba8808fb6c29ed2498257a4e00aeb4cdabbb/dotnet_generate-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f676125557a889e5cf4a59f970f0d3b8", "sha256": "794d955a8ee9da85d232ff42512de22d952583e7c0101f5e92481e9778f10c25" }, "downloads": -1, "filename": "dotnet-generate-0.5.0.tar.gz", "has_sig": false, "md5_digest": "f676125557a889e5cf4a59f970f0d3b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3465, "upload_time": "2019-02-20T16:36:38", "url": "https://files.pythonhosted.org/packages/3a/2b/25f4d589e98299f4ced38903732daca6ea0ae43724a7627abbae625adfda/dotnet-generate-0.5.0.tar.gz" } ] }