﻿using AutoMapper;
using EnterpriseLogging.Common.Model;
using EnterpriseLogging.Data;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EnterpriseLogging.Service
{
    public static class AutoMapper
    {
        public static void AutoMapperSetUp()
        {
            Mapper.CreateMap<Log, LogContent>();
            #region Column Level Mapping
            //Mapper.CreateMap<Log, LogContent>()
            //        .ForMember(dest => dest.AppDomainName, opt => opt.MapFrom(src => src.AppDomainName))
            //        .ForMember(dest => dest.EventID, opt => opt.MapFrom(src => src.EventID))
            //        .ForMember(dest => dest.ProcessID, opt => opt.MapFrom(src => src.ProcessID))
            //        .ForMember(dest => dest.FormattedMessage, opt => opt.MapFrom(src => src.FormattedMessage))
            //        .ForMember(dest => dest.MachineName, opt => opt.MapFrom(src => src.MachineName))
            //        .ForMember(dest => dest.Message, opt => opt.MapFrom(src => src.Message))
            //        .ForMember(dest => dest.Priority, opt => opt.MapFrom(src => src.Priority))
            //        .ForMember(dest => dest.ProcessName, opt => opt.MapFrom(src => src.ProcessName))
            //        .ForMember(dest => dest.Severity, opt => opt.MapFrom(src => src.Severity))
            //        .ForMember(dest => dest.Timestamp, opt => opt.MapFrom(src => src.Timestamp))
            //        .ForMember(dest => dest.Title, opt => opt.MapFrom(src => src.Title));
            #endregion
        }
    }    
}
