Hi to all,
Am a .Net developer and currently I'm developing an assembly that allow us to connect to 2014 MDS WCF Service as a facade to our web apps.
Am trying to make it work but EntityMembersGetRequest.MembersGetCriteria.SortColumnId does not result members sorted as I ask, here is the code am using:
//Realizamos la consulta en MDs por medio del servicio WCF que provee.
using (MDSServiceWCF.ServiceClient MDSClient = new ServiceClient(ConfigurationManager.AppSettings["MDSServiceEndPoint"]))
{
//Inicializamos los objetos para obtener la informacin de la entidad.
EntityMembersGetRequest mReq = new EntityMembersGetRequest();
mReq.MembersGetCriteria = new EntityMembersGetCriteria();
//Establecemos los valores para la consulta.
mReq.MembersGetCriteria.ModelId = new Identifier { Name = modelName };
mReq.MembersGetCriteria.VersionId = new Identifier { Name = versionName };
mReq.MembersGetCriteria.EntityId = new Identifier { Name = entityName };
mReq.MembersGetCriteria.MemberType = memType;
mReq.MembersGetCriteria.MemberReturnOption = MemberReturnOption.DataAndCounts;
//mReq.MembersGetCriteria.PageNumber = 1;
//mReq.MembersGetCriteria.PageSize = 50;
//mReq.MembersGetCriteria.SortColumnId = new Identifier { Name = "Name" };
//mReq.MembersGetCriteria.SortDirection = SortDirection.Asc;
EntityMembersGetResponse mResponse = MDSClient.EntityMembersGet(mReq);
//Determinamos si se encontraron errores.
if (mResponse.OperationResult.Errors.Count <= 0)
{
eMembers = mResponse.EntityMembers;
}
else
{
throw new MDMException("Se ha presentado un error en GenericCrud.GetAll.", mResponse.OperationResult.Errors.ToList());
}
}
Need to sort members by name (or whatever other member attribute), but the result is allways the same no matter what attribute I use.
Can anyone here give a hand with this?, tell me what am doing wrong?, online documentation (code examples) are very limited but not saying none.
Thx in advance for the help.
Best regards from Colombia (South Amrica).