{"id":"73acd114-a0fe-499b-ae59-0839a5d2103b","shortId":"d9EAvt","kind":"skill","title":"Ef Core","tagline":"Awesome Copilot skill by Github","description":"# Entity Framework Core Best Practices\n\nYour goal is to help me follow best practices when working with Entity Framework Core.\n\n## Data Context Design\n\n- Keep DbContext classes focused and cohesive\n- Use constructor injection for configuration options\n- Override OnModelCreating for fluent API configuration\n- Separate entity configurations using IEntityTypeConfiguration\n- Consider using DbContextFactory pattern for console apps or tests\n\n## Entity Design\n\n- Use meaningful primary keys (consider natural vs surrogate keys)\n- Implement proper relationships (one-to-one, one-to-many, many-to-many)\n- Use data annotations or fluent API for constraints and validations\n- Implement appropriate navigational properties\n- Consider using owned entity types for value objects\n\n## Performance\n\n- Use AsNoTracking() for read-only queries\n- Implement pagination for large result sets with Skip() and Take()\n- Use Include() to eager load related entities when needed\n- Consider projection (Select) to retrieve only required fields\n- Use compiled queries for frequently executed queries\n- Avoid N+1 query problems by properly including related data\n\n## Migrations\n\n- Create small, focused migrations\n- Name migrations descriptively\n- Verify migration SQL scripts before applying to production\n- Consider using migration bundles for deployment\n- Add data seeding through migrations when appropriate\n\n## Querying\n\n- Use IQueryable judiciously and understand when queries execute\n- Prefer strongly-typed LINQ queries over raw SQL\n- Use appropriate query operators (Where, OrderBy, GroupBy)\n- Consider database functions for complex operations\n- Implement specifications pattern for reusable queries\n\n## Change Tracking & Saving\n\n- Use appropriate change tracking strategies\n- Batch your SaveChanges() calls\n- Implement concurrency control for multi-user scenarios\n- Consider using transactions for multiple operations\n- Use appropriate DbContext lifetimes (scoped for web apps)\n\n## Security\n\n- Avoid SQL injection by using parameterized queries\n- Implement appropriate data access permissions\n- Be careful with raw SQL queries\n- Consider data encryption for sensitive information\n- Use migrations to manage database user permissions\n\n## Testing\n\n- Use in-memory database provider for unit tests\n- Create separate testing contexts with SQLite for integration tests\n- Mock DbContext and DbSet for pure unit tests\n- Test migrations in isolated environments\n- Consider snapshot testing for model changes\n\nWhen reviewing my EF Core code, identify issues and suggest improvements that follow these best practices.","tags":["core","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/ef-core","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T14:40:17.502Z","embedding":null,"createdAt":"2026-04-18T20:25:50.627Z","updatedAt":"2026-04-22T14:40:17.502Z","lastSeenAt":"2026-04-22T14:40:17.502Z","tsv":"'+1':155 'access':274 'add':185 'annot':91 'api':47,94 'app':60,262 'appli':176 'appropri':100,191,211,233,256,272 'asnotrack':113 'avoid':153,264 'awesom':3 'batch':237 'best':11,20,347 'bundl':182 'call':240 'care':277 'category-awesome-copilot' 'chang':229,234,332 'class':33 'code':338 'cohes':36 'compil':147 'complex':221 'concurr':242 'configur':41,48,51 'consid':54,69,103,138,179,217,249,282,327 'consol':59 'constraint':96 'constructor':38 'context':29,308 'control':243 'copilot':4 'core':2,10,27,337 'creat':164,305 'data':28,90,162,186,273,283 'databas':218,292,300 'dbcontext':32,257,315 'dbcontextfactori':56 'dbset':317 'deploy':184 'descript':170 'design':30,64 'eager':132 'ef':1,336 'encrypt':284 'entiti':8,25,50,63,106,135 'environ':326 'execut':151,200 'field':145 'fluent':46,93 'focus':34,166 'follow':19,345 'framework':9,26 'frequent':150 'function':219 'github':7 'goal':14 'groupbi':216 'help':17 'identifi':339 'ientitytypeconfigur':53 'implement':74,99,119,223,241,271 'improv':343 'in-memori':297 'includ':130,160 'inform':287 'inject':39,266 'integr':312 'iquery':194 'isol':325 'issu':340 'judici':195 'keep':31 'key':68,73 'larg':122 'lifetim':258 'linq':205 'load':133 'manag':291 'mani':84,86,88 'many-to-mani':85 'meaning':66 'memori':299 'migrat':163,167,169,172,181,189,289,323 'mock':314 'model':331 'multi':246 'multi-us':245 'multipl':253 'n':154 'name':168 'natur':70 'navig':101 'need':137 'object':110 'one':78,80,82 'one-to-mani':81 'one-to-on':77 'onmodelcr':44 'oper':213,222,254 'option':42 'orderbi':215 'overrid':43 'own':105 'pagin':120 'parameter':269 'pattern':57,225 'perform':111 'permiss':275,294 'practic':12,21,348 'prefer':201 'primari':67 'problem':157 'product':178 'project':139 'proper':75,159 'properti':102 'provid':301 'pure':319 'queri':118,148,152,156,192,199,206,212,228,270,281 'raw':208,279 'read':116 'read-on':115 'relat':134,161 'relationship':76 'requir':144 'result':123 'retriev':142 'reusabl':227 'review':334 'save':231 'savechang':239 'scenario':248 'scope':259 'script':174 'secur':263 'seed':187 'select':140 'sensit':286 'separ':49,306 'set':124 'skill':5 'skip':126 'small':165 'snapshot':328 'source-github' 'specif':224 'sql':173,209,265,280 'sqlite':310 'strategi':236 'strong':203 'strongly-typ':202 'suggest':342 'surrog':72 'take':128 'test':62,295,304,307,313,321,322,329 'track':230,235 'transact':251 'type':107,204 'understand':197 'unit':303,320 'use':37,52,55,65,89,104,112,129,146,180,193,210,232,250,255,268,288,296 'user':247,293 'valid':98 'valu':109 'verifi':171 'vs':71 'web':261 'work':23","prices":[{"id":"3c12cd25-541d-4995-82a0-bd3cf4f07c3b","listingId":"73acd114-a0fe-499b-ae59-0839a5d2103b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:50.627Z"}],"sources":[{"listingId":"73acd114-a0fe-499b-ae59-0839a5d2103b","source":"github","sourceId":"github/awesome-copilot/ef-core","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/ef-core","isPrimary":false,"firstSeenAt":"2026-04-18T21:49:15.571Z","lastSeenAt":"2026-04-22T12:52:11.883Z"},{"listingId":"73acd114-a0fe-499b-ae59-0839a5d2103b","source":"skills_sh","sourceId":"github/awesome-copilot/ef-core","sourceUrl":"https://skills.sh/github/awesome-copilot/ef-core","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:50.627Z","lastSeenAt":"2026-04-22T14:40:17.502Z"}],"details":{"listingId":"73acd114-a0fe-499b-ae59-0839a5d2103b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"ef-core","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/ef-core"},"updatedAt":"2026-04-22T14:40:17.502Z"}}