# PetaPoco.Compiled.Extensions **Repository Path**: sesametechgroup/PetaPoco.Compiled.Extensions ## Basic Information - **Project Name**: PetaPoco.Compiled.Extensions - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2019-04-18 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PetaPoco.Compiled.Extensions ## .net core 2.2 asp.net mvc 中使用PetePoco 定义一个继承PetaPocoDBContext的类MyPetaPocoDbContext,然后在Startup类的ConfigureServices方法中添加如下代码: ``` services.AddPetaPoco( options => { var connectionStrnig = Configuration["ConnectionStrings:mysql:WireCloudNetCoreMvcMySQL"]; var providerName = Configuration["ConnectionStrings:mysql:providerName"]; options.ConnectionString = connectionStrnig; options.ProviderName = providerName; }); ``` 在nuget中发布了0.0.1版本 使用命令 >> Install-Package PetaPoco.Compiled.Extensions -Version 0.0.1 BLOG:https://blog.csdn.net/weixin_42930928/article/details/89384044