Falcon.SugarApi/README.md

38 lines
2.5 KiB
Markdown
Raw Normal View History

2022-04-19 11:28:00 +08:00
## Falcon.SugarApi
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)
> `ApiControllerBase`webapi<70><69><EFBFBD>࣬ʵ<E0A3AC><CAB5><EFBFBD><EFBFBD><EFBFBD>ݿ⡢log<6F><67><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܡ<EFBFBD>
> `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>
### 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-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>
### <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>
2022-04-22 10:14:00 +08:00
> <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>