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)); }
public bool Delete(OpcionesPreguntas entity) { object[] parameters = new object[] { entity.Id }; return(Context.Database.ExecuteSqlCommand("dbo.usp_OpcionesPreguntasDelete @Id={0}", parameters) == -1 ? true : false); }
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()); }
public OpcionesPreguntas SelectByKey(OpcionesPreguntas entity) { object[] parameters = new object[] { entity.Id }; return(Context.Database.SqlQuery <OpcionesPreguntas>("dbo.usp_OpcionesPreguntasSelect @Id={0}", parameters).FirstOrDefault()); }