2020-10-15 13:34:25 +00:00
|
|
|
|
using AutoMapper;
|
2020-10-14 15:03:25 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace COA.EnterpriseServices.DataAccess.Helpers
|
|
|
|
|
{
|
2020-10-15 12:08:02 +00:00
|
|
|
|
public class ClientHelper
|
2020-10-14 15:03:25 +00:00
|
|
|
|
{
|
2020-10-15 13:34:25 +00:00
|
|
|
|
private readonly DataAccessManager<Entities.Client> clientDataAccess;
|
2020-10-15 12:08:02 +00:00
|
|
|
|
|
2020-10-15 13:34:25 +00:00
|
|
|
|
public ClientHelper(DataAccessManager<Entities.Client> clientDataAccess, IMapper mapper)
|
2020-10-15 12:08:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.clientDataAccess = clientDataAccess;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-15 13:34:25 +00:00
|
|
|
|
public ICollection<Entities.Client> FindByEmail(string email)
|
2020-10-14 15:03:25 +00:00
|
|
|
|
{
|
2020-10-15 13:34:25 +00:00
|
|
|
|
var client = clientDataAccess.Get(c => c.Email.Equals(email));
|
|
|
|
|
|
|
|
|
|
return client;
|
2020-10-14 15:03:25 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|