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 ;
3
2
using Microsoft . AspNetCore . Mvc ;
4
3
using SampleWebApiAspNetCore . Dtos ;
5
4
using SampleWebApiAspNetCore . Entities ;
8
7
using SampleWebApiAspNetCore . Models ;
9
8
using SampleWebApiAspNetCore . Repositories ;
10
9
using System . Text . Json ;
10
+ using MapsterMapper ;
11
11
12
12
namespace SampleWebApiAspNetCore . Controllers . v1
13
13
{
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- using Microsoft . AspNetCore . Mvc ;
1
+ using Mapster ;
2
2
using Microsoft . AspNetCore . Mvc . ApiExplorer ;
3
3
using Microsoft . AspNetCore . Mvc . Infrastructure ;
4
4
using Microsoft . AspNetCore . Mvc . Routing ;
7
7
using Newtonsoft . Json . Serialization ;
8
8
using SampleWebApiAspNetCore ;
9
9
using SampleWebApiAspNetCore . Helpers ;
10
- using SampleWebApiAspNetCore . MappingProfiles ;
11
10
using SampleWebApiAspNetCore . Repositories ;
12
11
using SampleWebApiAspNetCore . Services ;
13
12
using Swashbuckle . AspNetCore . SwaggerGen ;
40
39
builder . Services . AddDbContext < FoodDbContext > ( opt =>
41
40
opt . UseInMemoryDatabase ( "FoodDatabase" ) ) ;
42
41
43
- builder . Services . AddAutoMapper ( typeof ( FoodMappings ) ) ;
42
+ builder . Services . AddMapster ( ) ;
44
43
45
44
var app = builder . Build ( ) ;
46
45
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk.Web" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >net7 .0</TargetFramework >
4
+ <TargetFramework >net9 .0</TargetFramework >
5
5
<Nullable >enable</Nullable >
6
6
<ImplicitUsings >enable</ImplicitUsings >
7
7
</PropertyGroup >
8
8
9
9
<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 " />
18
18
</ItemGroup >
19
19
20
20
</Project >
You can’t perform that action at this time.
0 commit comments