Ejemplo n.º 1
0
        public Response <AttributeLinkModel> GetAttributeLinkModel(Guid attributeId)
        {
            var attr = _dictionaryAttrContext.GetById(attributeId);

            return(new Response <AttributeLinkModel>(new AttributeLinkModel
            {
                Id = attributeId,
                Type = attr.Type,
                Value = MultipleOperationsHelper.ConvertToType(attr.Type, "")
            }));
        }
Ejemplo n.º 2
0
 public Response <List <AttributeLinkModel> > GetAttributeSelectList(Guid?attributeTypeId)
 {
     return
         (new Response <List <AttributeLinkModel> >(
              _dictionaryAttrContext.GetList()
              .List()
              .Where(w => w.AttributeTypeId.Equals(attributeTypeId))
              .Select(
                  s =>
                  new AttributeLinkModel
     {
         Id = s.Id,
         Label = s.Name,
         Type = s.Type,
         Value = MultipleOperationsHelper.ConvertToType(s.Type, "")
     })
              .OrderBy(o => o.Label)
              .ToList()));
 }