fix
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using AutoMapper;
|
||||
using MyOffice.Core;
|
||||
|
||||
namespace MyOffice.Services;
|
||||
|
||||
public static class AutomapperExtensions
|
||||
{
|
||||
public static List<TTo> ToDto<TTo>(this IEnumerable<IDataModel> list, IMapper mapper)
|
||||
{
|
||||
return mapper.Map<List<TTo>>(list);
|
||||
}
|
||||
|
||||
public static TTo ToDto<TTo>(this IDataModel item, IMapper mapper)
|
||||
{
|
||||
return mapper.Map<TTo>(item);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user