public OpcionesPreguntas GetOne(int Id)
        {
            OpcionesPreguntasBo OpcionesPreguntasBo = new OpcionesPreguntasBo();
            OpcionesPreguntas   entity = new OpcionesPreguntas()
            {
                Id = Id
            };

            return(OpcionesPreguntasBo.SelectByKey(entity));
        }
        public bool Delete(int Id)
        {
            OpcionesPreguntasBo OpcionesPreguntasBo = new OpcionesPreguntasBo();
            OpcionesPreguntas   entity = new OpcionesPreguntas()
            {
                Id = Id
            };

            return(OpcionesPreguntasBo.Delete(entity));
        }
        public OpcionesPreguntas Update(OpcionesPreguntas entity)
        {
            OpcionesPreguntasBo OpcionesPreguntasBo = new OpcionesPreguntasBo();

            return(OpcionesPreguntasBo.Update(entity));
        }
        public OpcionesPreguntas New(OpcionesPreguntas entity)
        {
            OpcionesPreguntasBo OpcionesPreguntasBo = new OpcionesPreguntasBo();

            return(OpcionesPreguntasBo.Insert(entity));
        }
Exemple #5
0
 public bool Delete(OpcionesPreguntas entity)
 {
     object[] parameters = new object[] { entity.Id };
     return(Context.Database.ExecuteSqlCommand("dbo.usp_OpcionesPreguntasDelete @Id={0}", parameters) == -1 ? true : false);
 }
Exemple #6
0
 public OpcionesPreguntas Insert(OpcionesPreguntas entity)
 {
     object[] parameters = new object[] { entity.PreguntaId, entity.Descripcion, entity.Orden, entity.Correcta };
     return(Context.Database.SqlQuery <OpcionesPreguntas>("dbo.usp_OpcionesPreguntasInsert @PreguntaId={0}, @Descripcion={1}, @Orden={2}, @Correcta={3}", parameters).FirstOrDefault());
 }
Exemple #7
0
 public OpcionesPreguntas SelectByKey(OpcionesPreguntas entity)
 {
     object[] parameters = new object[] { entity.Id };
     return(Context.Database.SqlQuery <OpcionesPreguntas>("dbo.usp_OpcionesPreguntasSelect @Id={0}", parameters).FirstOrDefault());
 }