Beispiel #1
0
        public CardDataObject Parse(CardsModel cardModel)
        {
            CardDataObject obj = new CardDataObject
            {
                ExternalId   = cardModel.ExternalId,
                BadgeNumber  = cardModel.BadgeNumber,
                IsActive     = cardModel.IsActive,
                PIN          = cardModel.PIN,
                FacilityCode = cardModel.FacilityCode,
                Priority     = cardModel.Priority,
                IsBypass     = cardModel.IsBypass
            };

            return(obj);
        }
Beispiel #2
0
        public CardsModel Create(string externalId, CardDataObject cardDO)
        {
            CardsModel model = new CardsModel
            {
                Url          = urlHelper.Link("Card", new { externalId = externalId, cardExternalId = cardDO.ExternalId }),
                ExternalId   = cardDO.ExternalId,
                BadgeNumber  = cardDO.BadgeNumber,
                IsActive     = cardDO.IsActive,
                FacilityCode = cardDO.FacilityCode,
                IsBypass     = cardDO.IsBypass,
                Priority     = cardDO.Priority
            };

            return(model);
        }