2022-04-19 11:28:00 +08:00
|
|
|
|
## Falcon.SugarApi
|
2022-04-19 15:06:52 +08:00
|
|
|
|
|
2023-01-12 12:53:33 +08:00
|
|
|
|
### Nuget<65><74><EFBFBD><EFBFBD>ַ
|
|
|
|
|
<EFBFBD><EFBFBD>VS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD>`http://106.14.65.137/api/packages/Falcon/nuget/index.json`Ȼ<><C8BB><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD><EFBFBD><EFBFBD>Nuget<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>`Falcon.SugarApi `<60><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
2023-01-12 11:10:29 +08:00
|
|
|
|
### <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>nuget<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Falcon.SugarApi.xml<6D>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>swagger<65><72><EFBFBD>ٺܶ<D9BA>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD>ܻᱨ<DCBB><E1B1A8><EFBFBD><EFBFBD>
|
2023-01-12 11:07:51 +08:00
|
|
|
|
<EFBFBD><EFBFBD>һ<EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.csproj<6F><6A>Ŀ<EFBFBD>ļ<EFBFBD><C4BC>п<EFBFBD><D0BF>Ը<EFBFBD><D4B8>ư<EFBFBD><C6B0>е<EFBFBD>xml<6D>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<C4BF>ͷ<EFBFBD><CDB7><EFBFBD>Ŀ¼<C4BF><C2BC>
|
|
|
|
|
```xml
|
2023-01-12 11:10:29 +08:00
|
|
|
|
<Target Name="CopyReferenceFiles" BeforeTargets="Build">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<XmlReferenceFiles Condition="Exists('$(OutputPath)%(Filename).dll')" Include="%(Reference.RelativeDir)%(Reference.Filename).xml" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
|
|
|
|
|
<Copy SourceFiles="@(XmlReferenceFiles)" DestinationFolder="$(OutputPath)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
|
|
|
|
|
</Target>
|
|
|
|
|
<Target Name="CopyReferenceFilesToPublish" BeforeTargets="PrepareForPublish">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<XmlReferenceFiles Condition="Exists('$(OutputPath)%(Filename).dll')" Include="%(Reference.RelativeDir)%(Reference.Filename).xml" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
|
|
|
|
|
<Copy SourceFiles="@(XmlReferenceFiles)" DestinationFolder="$(PublishDir)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
|
|
|
|
|
</Target>
|
2023-01-12 11:07:51 +08:00
|
|
|
|
```
|
|
|
|
|
|
2022-04-19 15:06:52 +08:00
|
|
|
|
### WebApi<70><69>չģ<D5B9><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/ApiDefinistions)
|
2022-05-04 16:11:18 +08:00
|
|
|
|
> `ApiControllerBase`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>webapi<70><69><EFBFBD>࣬ʵ<E0A3AC><CAB5><EFBFBD><EFBFBD><EFBFBD>ݿ⡢log<6F><67><EFBFBD>쳣<EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܡ<EFBFBD>
|
2022-04-19 15:06:52 +08:00
|
|
|
|
> `ApiBaseOptionController<>`<60><><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>webapi<70><69><EFBFBD>࣬<EFBFBD><E0A3AC><EFBFBD><EFBFBD>`ApiControllerBase`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṩ<EFBFBD><E1B9A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD>IJ鹦<C4B2>ܡ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
### Swagger<65><72>չģ<D5B9><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/Swagger)
|
|
|
|
|
> `waggerGenOptions.AddXmlEnumEnable`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊö<CEAA><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>͡<EFBFBD>
|
|
|
|
|
|
|
|
|
|
### SugarDbContext<78><74>չģ<D5B9><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/DatabaseDefinitions)
|
2022-04-19 15:10:56 +08:00
|
|
|
|
> ͨ<><CDA8>`IServiceCollection.AddSugarApiDbContext` ע<><D7A2>`SugarDbContext`<60><><EFBFBD>ö<F3A3ACB8><C3B6><EFBFBD>ͨ<EFBFBD><CDA8>`SugarConnectionConfig`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ӡ<EFBFBD>
|
2022-04-19 15:06:52 +08:00
|
|
|
|
> `DbSet<T>`<60><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>壬֧<E5A3AC>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ<EFBFBD><D1AF>
|
2022-04-19 15:10:56 +08:00
|
|
|
|
> `SugarDbTables<T>`<60><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϻ<EFBFBD><CFBB>࣬<EFBFBD><E0A3AC><EFBFBD>Լ̳и<CCB3><D0B8>ಢ<EFBFBD><E0B2A2><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD>`DbSet<T>`<60><><EFBFBD>ԣ<EFBFBD><D4A3><EFBFBD>Щ<EFBFBD><D0A9><EFBFBD>Ի<EFBFBD><D4BB>Զ<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2022-04-19 15:06:52 +08:00
|
|
|
|
> `SugarTableBase`<60><><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD>࣬<EFBFBD>̳и<CCB3><D0B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṩ<EFBFBD><E1B9A9><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ȡ<EFBFBD>
|
|
|
|
|
|
2022-05-04 16:11:18 +08:00
|
|
|
|
### <20><>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>BackTaskģ<6B><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/BackTask)
|
|
|
|
|
> <20>̳<EFBFBD>`BackgroundLongTask`<60><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ں<EFBFBD>ִ̨<CCA8>еĶ<D0B5><C4B6><EFBFBD><F3A3ACB8><EFBFBD>ͨ<EFBFBD><CDA8>`IServiceCollection.AddHostedService<>'<27><><EFBFBD><EFBFBD>ע<EFBFBD>ᡣ
|
|
|
|
|
> `RunTimespan`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>е<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
> <20><>д`RunAsync`<60><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>һ<EFBFBD><D2BB><EFBFBD>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д`OnStart`<60><>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>`OnStop`<60><>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>`OnCompleted`һ<><D2BB>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD>ɺ<EFBFBD>`OnException`ִ<><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쳣<EFBFBD><ECB3A3>
|
|
|
|
|
|
|
|
|
|
### <20><><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD>ģ<EFBFBD><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/Cache)
|
|
|
|
|
> ͨ<><CDA8>`IServiceCollection.AddSugarRedisCache` <20><> `IServiceCollection.AddSugarMemoryCache`<60><><EFBFBD><EFBFBD>ע<EFBFBD>Ỻ<EFBFBD><E1BBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
> ͨ<><CDA8>ע<EFBFBD><D7A2> `ISugarCache`ͬ<><CDAC><EFBFBD>ӿ<EFBFBD> <20><> `ISugarCacheAsync`<60>첽<EFBFBD>ӿڻ<D3BF>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
> ͨ<><CDA8><EFBFBD>ӿڵ<D3BF>`Get`<60><>`Set`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD>ͱ<EFBFBD><CDB1>滺<EFBFBD><E6BBBA>ֵ<EFBFBD><D6B5>
|
|
|
|
|
|
2022-04-19 15:06:52 +08:00
|
|
|
|
### XML<4D><4C><EFBFBD>л<EFBFBD><D0BB><EFBFBD>չģ<D5B9><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/XmlSerialize)
|
2022-04-19 15:10:56 +08:00
|
|
|
|
> `IServiceCollection.AddXmlSerializeFactory`<60><><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>xml<6D><6C><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>`XmlSerializeFactory`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>XML<4D><4C><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>
|
2022-04-19 15:06:52 +08:00
|
|
|
|
|
|
|
|
|
### JSON<4F><4E><EFBFBD>л<EFBFBD><D0BB><EFBFBD>չģ<D5B9><C4A3> [<5B><><EFBFBD><EFBFBD>](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/JsonSerialize)
|
2022-04-19 15:10:56 +08:00
|
|
|
|
> `IServiceCollection.AddJsonSerializeFactory`<60><><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>Json<6F><6E><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>`JsonSerializeFactory`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Json<6F><6E><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>
|
2022-05-24 15:53:26 +08:00
|
|
|
|
> `ArrayStringJsonConverterAttribute`<60><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ᱻ<EFBFBD><E1B1BB><EFBFBD>л<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>顣
|
2022-04-19 15:06:52 +08:00
|
|
|
|
|
|
|
|
|
### <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
|
|
|
|
|
> `IsNullOrEmpty()`<60><>`IsNotNullOrEmpty()`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD>ա<EFBFBD>
|
|
|
|
|
> `SplitStr()`Ĭ<><C4AC>ʵ<EFBFBD>ְ<EFBFBD><D6B0><EFBFBD>`',', '<27><>', ';', '<27><>', '.', '<27><>'`<60><><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>зָ
|
|
|
|
|
|
|
|
|
|
### Object<63><74>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
|
|
|
|
|
> `CloneTo`<60><>`CloneFrom`ʵ<>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD>ֵ<EFBFBD><D6B5>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>Ϊdz<CEAA><C7B3><EFBFBD><EFBFBD><EFBFBD>ơ<EFBFBD>
|
|
|
|
|
|
2022-05-04 16:11:18 +08:00
|
|
|
|
### IEnumerable<6C><65>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
|
|
|
|
|
> `ToDataTable`<60><>`ToDataTable<>`<60>ֱ<EFBFBD>ʵ<EFBFBD>ֽ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ΪDataTable<6C>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Objectö<74><C3B6>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD>٣<EFBFBD><D9A3><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>÷<EFBFBD><C3B7>Ͱ汾<CDB0><E6B1BE><EFBFBD><EFBFBD><EFBFBD>Ӹ<EFBFBD>Ч<EFBFBD><D0A7>
|
2022-04-22 10:14:00 +08:00
|
|
|
|
|