| | |
| | | /// <returns>时间</returns> |
| | | public static DateTime? ToDateTime(this object obj) |
| | | { |
| | | if (obj != null && DateTime.TryParse(obj.ToString(), out var date) && date != DateTime.MinValue) |
| | | if (obj != null && DateTime.TryParse(obj.ToString(), out var date) && date != DateTime.MinValue && date != DateTimeOffset.MinValue) |
| | | { |
| | | return date; |
| | | } |
| | |
| | | using Microsoft.EntityFrameworkCore.ChangeTracking; |
| | | using Microsoft.EntityFrameworkCore.Diagnostics; |
| | | using Microsoft.EntityFrameworkCore.Metadata.Builders; |
| | | using Microsoft.Extensions.Configuration; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | modelBuilder.Entity(entityType.ClrType).HasQueryFilter(lambda); |
| | | } |
| | | } |
| | | |
| | | Console.WriteLine("数据库链接地址:" + App.Configuration.GetConnectionString("FlexJobApi")); |
| | | } |
| | | |
| | | public static void SavingChangesEvent(DbContextEventData eventData, InterceptionResult<int> result) |
| | |
| | | <ProjectReference Include="..\FlexJobApi.Database.Migrations\FlexJobApi.Database.Migrations.csproj" /> |
| | | <ProjectReference Include="..\FlexJobApi.User.Application\FlexJobApi.User.Application.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Logs\" /> |
| | | </ItemGroup> |
| | | <ProjectExtensions> |
| | | <VisualStudio> |
| | | <UserProperties properties_4launchsettings_1json__JsonSchema="" /> |
| | |
| | | { |
| | | "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", |
| | | "ConnectionStrings": { |
| | | "FlexJobApi": "Server=120.26.58.240; Database=Dev_FlexJobApi; User=bole;Password=Bole1472589;TrustServerCertificate=True;", |
| | | "FlexJobApiLog": "Server=120.26.58.240; Database=Dev_FlexJobApiLog; User=bole;Password=Bole1472589;TrustServerCertificate=True;" |
| | | "FlexJobApi": "Server=120.26.58.240; Database=Dev_FlexJobApi; User=bole;Password=Bole1472589;Encrypt=false;", |
| | | "FlexJobApiLog": "Server=120.26.58.240; Database=Dev_FlexJobApiLog; User=bole;Password=Bole1472589;Encrypt=false;" |
| | | } |
| | | } |