Esempio n. 1
0
        // GET: Cards
        public ActionResult Index()
        {
            OperationService op = new OperationService();
            var modelList       = op.GetCards();
            var returnModelList = modelList?.Select(x => new CardViewModel()
            {
                CreateDate = x.CreateDate,
                Id         = x.Id,
                IsActive   = x.IsActive,
                CardId     = x.CardId,
                CardPrice  = x.CardPrice
            }) ?? new List <CardViewModel>();

            return(View(returnModelList));
        }