﻿using System.Data.Common;
using EmailRegistry.Infrastructure.Data.BO;

namespace EmailRegistry.Infrastructure.Data.Sources.SQLite.ValueTransformers
{
    public class DepartmentTransformer : ResultTransformerBase
    {
        protected override object ReadLine(DbDataReader reader)
        {
            return new Department
            {
                Id = reader["Id"].AsGuid().Value,
                Name = reader["Name"].AsString(),
                IsDeleted = reader["IsDeleted"].AsBool().Value
            };
        }
    }
}