Ejemplo n.º 1
0
 public void Insert(Assessment.Entities.Assessment assessment)
 {
     using (IDbConnection dbConnection = Connection)
     {
         dbConnection.Open();
         dbConnection.Execute(
             "Insert into Assessment (LevelNumber, SubjectId, Name) values (@LevelNumber, @SubjectId, @Name)"
             , new { LevelNumber = assessment.LevelNumber, SubjectID = assessment.SubjectID, Name = assessment.Name }
             , commandType: CommandType.Text);
     }
 }
Ejemplo n.º 2
0
 public void Update(Assessment.Entities.Assessment assessment)
 {
     using (IDbConnection dbConnection = Connection)
     {
         dbConnection.Open();
         dbConnection.Execute(
             "Update Assessment Set " +
             "LevelNumber = @LevelNumber, SubjectId = @SubjectId, Name = @Name" +
             "Where AssessmentId = @AssessmentId"
             , assessment
             , commandType: CommandType.Text);
     }
 }
 public void Put([FromBody] Assessment.Entities.Assessment assessment)
 {
     _service.Update(assessment);
 }
 public void Post([FromBody] Assessment.Entities.Assessment assessment)
 {
     _service.Insert(assessment);
 }
Ejemplo n.º 5
0
 public void Update(Assessment assessment)
 {
     _repository.Update(assessment);
 }
Ejemplo n.º 6
0
 public void Insert(Assessment assessment)
 {
     _repository.Insert(assessment);
 }