File tree Expand file tree Collapse file tree 4 files changed +13
-30
lines changed Expand file tree Collapse file tree 4 files changed +13
-30
lines changed Original file line number Diff line number Diff line change 1- using AutoMapper ;
2- using Microsoft . AspNetCore . JsonPatch ;
1+ using Microsoft . AspNetCore . JsonPatch ;
32using Microsoft . AspNetCore . Mvc ;
43using SampleWebApiAspNetCore . Dtos ;
54using SampleWebApiAspNetCore . Entities ;
87using SampleWebApiAspNetCore . Models ;
98using SampleWebApiAspNetCore . Repositories ;
109using System . Text . Json ;
10+ using MapsterMapper ;
1111
1212namespace SampleWebApiAspNetCore . Controllers . v1
1313{
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- using Microsoft . AspNetCore . Mvc ;
1+ using Mapster ;
22using Microsoft . AspNetCore . Mvc . ApiExplorer ;
33using Microsoft . AspNetCore . Mvc . Infrastructure ;
44using Microsoft . AspNetCore . Mvc . Routing ;
77using Newtonsoft . Json . Serialization ;
88using SampleWebApiAspNetCore ;
99using SampleWebApiAspNetCore . Helpers ;
10- using SampleWebApiAspNetCore . MappingProfiles ;
1110using SampleWebApiAspNetCore . Repositories ;
1211using SampleWebApiAspNetCore . Services ;
1312using Swashbuckle . AspNetCore . SwaggerGen ;
4039builder . Services . AddDbContext < FoodDbContext > ( opt =>
4140 opt . UseInMemoryDatabase ( "FoodDatabase" ) ) ;
4241
43- builder . Services . AddAutoMapper ( typeof ( FoodMappings ) ) ;
42+ builder . Services . AddMapster ( ) ;
4443
4544var app = builder . Build ( ) ;
4645
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net7 .0</TargetFramework >
4+ <TargetFramework >net9 .0</TargetFramework >
55 <Nullable >enable</Nullable >
66 <ImplicitUsings >enable</ImplicitUsings >
77 </PropertyGroup >
88
99 <ItemGroup >
10- <PackageReference Include =" AutoMapper " Version =" 12.0.1 " />
11- <PackageReference Include =" AutoMapper.Extensions.Microsoft. DependencyInjection" Version =" 12 .0.0 " />
12- <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 7 .0.2 " />
13- <PackageReference Include =" Microsoft.AspNetCore.Mvc.Versioning" Version =" 5.0 .0" />
14- <PackageReference Include =" Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version =" 5.0 .0" />
15- <PackageReference Include =" Microsoft.EntityFrameworkCore.InMemory" Version =" 7 .0.2 " />
16- <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 6.5.0 " />
17- <PackageReference Include =" System.Linq.Dynamic.Core" Version =" 1.2.24 " />
10+ <PackageReference Include =" Mapster " Version =" 7.4.0 " />
11+ <PackageReference Include =" Mapster. DependencyInjection" Version =" 1 .0.1 " />
12+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 9 .0.8 " />
13+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Versioning" Version =" 5.1 .0" />
14+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version =" 5.1 .0" />
15+ <PackageReference Include =" Microsoft.EntityFrameworkCore.InMemory" Version =" 9 .0.8 " />
16+ <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 9.0.3 " />
17+ <PackageReference Include =" System.Linq.Dynamic.Core" Version =" 1.6.7 " />
1818 </ItemGroup >
1919
2020</Project >
You can’t perform that action at this time.
0 commit comments