Files
Umbraco-CMS/src/Umbraco.Web/Models/Mapping/LogModelMapper.cs
Per Ploug Krogslund 7440855c72 merge
2013-11-07 17:16:22 +01:00

17 lines
593 B
C#

using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Models.Mapping;
using Umbraco.Web.Models.ContentEditing;
using umbraco.BusinessLogic;
namespace Umbraco.Web.Models.Mapping
{
internal class LogModelMapper : MapperConfiguration
{
public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext)
{
config.CreateMap<LogItem, AuditLog>()
.ForMember(log => log.LogType, expression => expression.MapFrom(item => Enum<AuditLogType>.Parse(item.LogType.ToString())));
}
}
}