示例#1
0
        public Testimonio Obtener(int id)
        {
            var Testimonio = new Testimonio();

            try
            {
                using (var ctx = new ProyectoContext())
                {
                    Testimonio = ctx.Testimonio.Where(x => x.id == id)
                                 .SingleOrDefault();
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Testimonio);
        }
示例#2
0
        public Testimonio getTestimony(int id)
        {
            var testimonio = new Testimonio();

            try
            {
                using (var ctx = new ProjectContext())
                {
                    testimonio = ctx.Testimonio.Where(x => x.id == id)
                                 .SingleOrDefault();
                }
            }
            catch (Exception E)
            {
                throw;
            }

            return(testimonio);
        }