using System.Linq;
using BO.AppServer.Data.Entity;
using Quadarax.Foundation.Core.Data;
using Quadarax.Foundation.Core.Data.Domain;
using Quadarax.Foundation.Core.Data.Interface.Domain;
using Quadarax.Foundation.Core.Data.Repository;

public class MimeTypeRepo : EntityRepository<long,  MimeType>
    {
        public MimeTypeRepo(IUnitOfWork<DataDomain> unitOfWork) : base(unitOfWork)
        {
        }

        public MimeType GetByMimeType(string mimeType)
        {
            return Query(new Paging()).FirstOrDefault(x => x.IsEnabled && x.Mimetype1 == mimeType.ToLower());
        }
    }