mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 18:22:11 +08:00
采用全新的数据库架构
This commit is contained in:
27
Infrastructure/AutoMapperExt.cs
Normal file
27
Infrastructure/AutoMapperExt.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : FairUtility
|
||||
// Author : Yubao Li
|
||||
// Created : 08-27-2015
|
||||
//
|
||||
// Last Modified By : Yubao Li
|
||||
// Last Modified On : 08-27-2015
|
||||
// ***********************************************************************
|
||||
// <copyright file="AutoMapperExt.cs" company="">
|
||||
// Copyright (c) . All rights reserved.
|
||||
// </copyright>
|
||||
// <summary></summary>
|
||||
// ***********************************************************************
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
namespace Infrastructure
|
||||
{
|
||||
public class AutoMapperExt
|
||||
{
|
||||
public static TResult ConvertTo<T, TResult>(T source)
|
||||
{
|
||||
var mapper = Mapper.CreateMap<T, TResult>();
|
||||
return Mapper.Map<TResult>(source);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user