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 UserRepo : EntityRepository<long,  User>
    {
        public UserRepo(IUnitOfWork<DataDomain> unitOfWork) : base(unitOfWork)
        {
        }

        public User GetByIfReference(string ifReference)
        {
            return Query(new Paging()).FirstOrDefault(x => x.Ifreference == ifReference);
        }
       
        public User GetByName(string name)
        {
            return Query(new Paging()).FirstOrDefault(x => x.Name.ToLower() == name.ToLower());
        }
    }