// POST: api/CreateFaxSendTo
        public IHttpActionResult Post([FromBody]FaxToInformation faxToInformation)
        {
            SendToRepository sendToData = new SendToRepository();

            if (faxToInformation.Prefix == "Prefix")
            {
                faxToInformation.Prefix = string.Empty;
            }

            if (faxToInformation.Suffix == "Suffix")
            {
                faxToInformation.Suffix = string.Empty;
            }

            faxToInformation.FaxNumber = faxToInformation.FaxNumber.Replace("(", "")
                .Replace(")", "")
                .Replace(" ", "")
                .Replace("-", "");
            faxToInformation.Name = faxToInformation.Prefix + " "
                + faxToInformation.FirstName + " "
                + faxToInformation.LastName + " "
                + faxToInformation.Suffix;


            OperationResult operationResult = sendToData.AddFaxAddressbookEntry(faxToInformation);

            if (operationResult.Success)
            {
                return Ok();
            }
            else
            {
                return BadRequest();
            }
        }
        // POST: api/EditFaxToEntry
        public IHttpActionResult Post([FromBody]SendFaxInformation faxEntry)
        {
            OperationResult operationResult = new Models.OperationResult();
            SendToRepository sendToData = new SendToRepository();
            faxEntry.FaxNumber = faxEntry.FaxNumber.Replace("-", "")
                .Replace(" ", "")
                .Replace("(", "")
                .Replace(")", "");

            if (faxEntry.Prefix == "Prefix")
            {
                faxEntry.Prefix = string.Empty;
            }

            if (faxEntry.Suffix == "Suffix")
            {
                faxEntry.Suffix = string.Empty;
            }

            faxEntry.Name = faxEntry.Prefix + " "
            + faxEntry.FirstName + " "
            + faxEntry.LastName + " "
            + faxEntry.Suffix;

            operationResult.Success = sendToData.UpdateFaxEntry(faxEntry);

            if (operationResult.Success)
            {
                return Ok();
            }
            else
            {
                return BadRequest(); 
            }
        }
        // DELETE: api/EditFaxToEntry/5
        public IHttpActionResult Delete(int id)
        {
            OperationResult operationResult = new Models.OperationResult();
            SendToRepository sendToData = new SendToRepository();
            operationResult = sendToData.DeleteFaxEntry(id);

            if (operationResult.Success)
            {
                return Ok();
            }
            else
            {
                return BadRequest();
            }
        }
 // GET: api/SendTo
 public IEnumerable<SendFaxInformation> Get()
 {
     string filter = PostOffice.Api.Models.HttpRequestMessageExtensions.GetQueryString(Request, "filter.filters[0].value");
     SendToRepository sendToData = new SendToRepository();
     return sendToData.GetAllFaxInformation(filter);
 }