mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-21 02:57:54 +08:00
优化AutoMapper代码
This commit is contained in:
@@ -52,12 +52,12 @@ namespace OpenAuth.App.ViewModel
|
||||
|
||||
public static implicit operator RoleVM(Role role)
|
||||
{
|
||||
return AutoMapperExt.ConvertTo<Role,RoleVM>(role);
|
||||
return role.MapTo<RoleVM>();
|
||||
}
|
||||
|
||||
public static implicit operator Role(RoleVM rolevm)
|
||||
{
|
||||
return AutoMapperExt.ConvertTo<RoleVM, Role>(rolevm);
|
||||
return rolevm.MapTo<Role>();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user