コード例 #1
0
ファイル: Testimonio.cs プロジェクト: mmojica006/Testing001
        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);
        }