Exemplo n.º 1
0
        //GET DETAIL Souvenir
        public static SouvenirViewModel GetDetailSouvenirById(int paramSouvenirId)
        {
            SouvenirViewModel result = new SouvenirViewModel();

            using (var db = new MarkomApplicationDBEntities())
            {
                var res = db.spSouDetailByID(paramSouvenirId);

                result = res.Select(c => new SouvenirViewModel
                {
                    id          = c.id,
                    code        = c.code,
                    name        = c.name,
                    mUnitId     = c.m_unit_id,
                    unitName    = c.unit_name,
                    description = c.description
                }).FirstOrDefault();
            }

            return(result);
        }