public GetClientFilterOut GetClientFilterName(GetClientFilterIn input) { GetClientFilterOut response = new GetClientFilterOut() { ResponseCode = Entities.Client.General.ResponseCode.Error }; using (IDbConnection connection = new SqlConnection(connectionString)) { connection.Open(); DynamicParameters param = new DynamicParameters(); var data = connection.Query <Client>("SELECT ClientId,FirstName,LastName,Age,Identification,Email,CreationDate FROM tbl_Client WHERE FirstName LIKE'%" + input.FirstName + "%'"); var clientList = new List <Client>(); foreach (var i in data) { var client = new Client() { ClientId = i.ClientId, FirstName = i.FirstName, LastName = i.LastName, Age = i.Age, Identification = i.Identification, Email = i.Email, CreationDate = i.CreationDate }; clientList.Add(client); } response.client = clientList; if (response.client.Count > 0) { response.ResponseCode = Entities.Client.General.ResponseCode.Success; } } return(response); }
public IHttpActionResult GetClientFilterEmail(GetClientFilterIn input) { var response = client.GetClientFilterEmail(input); return(Ok(response)); }
public GetClientFilterOut GetClientFilterName(GetClientFilterIn input) { return(clientDA.GetClientFilterName(input)); }
public GetClientFilterOut GetClientFilterEmail(GetClientFilterIn input) { return(clientDA.GetClientFilterEmail(input)); }