Exemplo n.º 1
0
        /// <summary>
        /// Gets all the models
        /// </summary>
        /// <returns></returns>
        public IList <TModel> GetAll()
        {
            IAmplaViewProperties <TModel> amplaViewProperties = GetViewProperties(null);

            amplaViewProperties.Enforce.CanView();

            var             request  = GetDataRequest(true);
            GetDataResponse response = webServiceClient.GetData(request);

            List <TModel> records = new List <TModel>();
            IAmplaBinding binding = new AmplaGetDataBinding <TModel>(response, records, ModelProperties);

            if (binding.Validate() && binding.Bind())
            {
                return(records);
            }

            return(null);
        }
Exemplo n.º 2
0
 public GetDataResponse GetData(GetDataRequest request)
 {
     logger.Log("GetData ({0})", request);
     return(implementation.GetData(request));
 }