upgrading to .net 10

This commit is contained in:
Hamid Reza Mohammadi 2026-07-05 21:14:32 +03:30
parent 412a77a30c
commit 70ce216131
8 changed files with 26 additions and 22 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<TargetFramework>net10.0-windows7.0</TargetFramework>
<UserSecretsId>fd532270-83bc-47f7-ba3d-b26139f2d5a5</UserSecretsId>
<StartupObject>GanjooRazor.Program</StartupObject>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
<ItemGroup>

View File

@ -15,7 +15,8 @@ namespace RMuseum.Controllers
/// constructor
/// </summary>
/// <param name="notificationService"></param>
public NotificationController(IRNotificationService notificationService) : base(notificationService)
/// <param name="appUserService"></param>
public NotificationController(IRNotificationService notificationService, IAppUserService appUserService) : base(notificationService, appUserService)
{
}
}

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<TargetFramework>net10.0-windows7.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>c9ed8ad2-c9c8-4d81-91ba-6865a4acbf13</UserSecretsId>
<StartupObject>RMuseum.Program</StartupObject>
@ -18,20 +18,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Betalgo.Ranul.OpenAI" Version="9.0.1" />
<PackageReference Include="DNTPersianUtils.Core" Version="6.6.0" />
<PackageReference Include="FluentFTP" Version="52.0.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.2">
<PackageReference Include="Betalgo.Ranul.OpenAI" Version="9.2.6" />
<PackageReference Include="DNTPersianUtils.Core" Version="7.0.0" />
<PackageReference Include="FluentFTP" Version="54.2.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="RSecurityBackend" Version="1.5.6" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
<PackageReference Include="NAudio" Version="2.3.0" />
<PackageReference Include="RSecurityBackend" Version="1.6.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="10.0.1" />
</ItemGroup>
<ItemGroup>

View File

@ -2883,11 +2883,12 @@
Notifications controller
</summary>
</member>
<member name="M:RMuseum.Controllers.NotificationController.#ctor(RSecurityBackend.Services.IRNotificationService)">
<member name="M:RMuseum.Controllers.NotificationController.#ctor(RSecurityBackend.Services.IRNotificationService,RSecurityBackend.Services.IAppUserService)">
<summary>
constructor
</summary>
<param name="notificationService"></param>
<param name="appUserService"></param>
</member>
<member name="M:RMuseum.Controllers.NumberingController.GetNumberingsAsync">
<summary>

View File

@ -15,6 +15,7 @@ using System.Drawing;
using FluentFTP;
using System.Threading.Tasks;
using RMuseum.Models.GanjoorIntegration;
using Betalgo.Ranul.OpenAI.Contracts.Requests.Image;
namespace RMuseum.Services.Implementation
@ -222,7 +223,7 @@ namespace RMuseum.Services.Implementation
await jobProgressServiceEF.UpdateJob(job.Id, i, $"{i} از {poems.Count} - {poem.FullTitle} - 4");
//4
var imageCreationResult = await openAiService.Image.CreateImage(new ImageCreateRequest
var imageCreationResult = await openAiService.Image.CreateImage(new CreateImageRequest
(
prompt
)
@ -232,7 +233,7 @@ namespace RMuseum.Services.Implementation
);
if (imageCreationResult.Successful)
{
string imageUrl = imageCreationResult.Results.Select(u => u.Url).First();
string imageUrl = imageCreationResult.Results.First();
if (!string.IsNullOrEmpty(imageUrl))
{

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Configuration;
@ -34,9 +35,10 @@ namespace RMuseum.Services.Implementation
IImageFileService imageFileService,
IUserRoleService userRoleService,
IConfiguration configuration,
IMemoryCache memoryCache
IMemoryCache memoryCache,
IEmailSender emailSender
)
: base(context, userManager, signInManager, roleManager, secretGenerator, imageFileService, userRoleService, configuration)
: base(context, userManager, signInManager, roleManager, secretGenerator, imageFileService, userRoleService, configuration, emailSender)
{
_memoryCache = memoryCache;
}

View File

@ -15,7 +15,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;
using RMuseum.DbContext;
using RMuseum.Models.Auth.Memory;
using RMuseum.Services;

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<TargetFramework>net10.0-windows7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>