{"id":22384702,"url":"https://github.com/stofte/roslyn-ef-codegen","last_synced_at":"2025-03-26T20:22:44.154Z","repository":{"id":146037847,"uuid":"58000087","full_name":"stofte/roslyn-ef-codegen","owner":"stofte","description":"dynamic compile example of ef7 code using roslyn","archived":false,"fork":false,"pushed_at":"2016-11-17T13:08:54.000Z","size":407,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T02:18:44.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stofte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-03T20:36:47.000Z","updated_at":"2023-07-22T19:40:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a4ed6f5-50cf-44cf-9d97-b993ffcb27d8","html_url":"https://github.com/stofte/roslyn-ef-codegen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stofte%2Froslyn-ef-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stofte%2Froslyn-ef-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stofte%2Froslyn-ef-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stofte%2Froslyn-ef-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stofte","download_url":"https://codeload.github.com/stofte/roslyn-ef-codegen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245728143,"owners_count":20662632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T01:18:54.798Z","updated_at":"2025-03-26T20:22:44.127Z","avatar_url":"https://github.com/stofte.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Microsoft.CodeAnalysis/EntityFrameworkCore codegeneration example\n-----------------------------------------------------------------\n[![Windows build status](https://ci.appveyor.com/api/projects/status/2l98lij5j93wf1q1?svg=true)](https://ci.appveyor.com/project/stofte/roslyn-ef-codegen) [![Linux build Status](https://travis-ci.org/stofte/roslyn-ef-codegen.svg?branch=master)](https://travis-ci.org/stofte/roslyn-ef-codegen)\n\nThis repository contains some rough POC code that\nshows how to use CodeAnalysis and EFCore to create dynamic\nqueries at runtime against databases chosen at runtime.\n.NET Core 1.1 is required to run the code.\n\nThe code is linear and starts in `Program.Main`:\n\n- Generate a SQLite schema/context in-memory using EF's reverse engineering tools\n- Use CodeAnalysis to compile and load the schema\n- Compile a query `SomeNs.Generated : IGenerated` and link the EF context\n- Create an instance of the generated query and calls its main method\n- The instance first calls back to the host library (to test that \"static\" host classes can be referenced)\n- It then creates an instance of the EF context, and counts the number of city names starting with \"Ca\"\n\nThe Xunit test project just calls the main projects `Main` method (mostly to test that everything connects).\n\nUsage\n-----\n\n    dotnet restore\n    dotnet test test/ConsoleApp.Test\n\nOutput should be\n\n    Serious testing:\n    hello from main\n    Cities starting with 'Ca': 83","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstofte%2Froslyn-ef-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstofte%2Froslyn-ef-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstofte%2Froslyn-ef-codegen/lists"}