public List <TestGroupDTO> GetByGroupIdTestId(TestGroupDTO testgroup)
 {
     using (IDbConnection connection = Connection.GetConnection())
     {
         string sqlExpression = "Test_Group_GetByGroupIdTestId";
         return(connection.Query <TestGroupDTO>(sqlExpression, testgroup, commandType: CommandType.StoredProcedure).ToList());
     }
 }
 public void DeleteByGroupIdTestId(TestGroupDTO testgroup)
 {
     using (IDbConnection connection = Connection.GetConnection())
     {
         string sqlExpression = "Test_Group_DeleteByGroupIdTestId";
         connection.Execute(sqlExpression, testgroup, commandType: CommandType.StoredProcedure);
     }
 }
 public int Add(TestGroupDTO testgroup)
 {
     using (IDbConnection connection = Connection.GetConnection())
     {
         string sqlExpression = "Test_Group_Add @GroupId, @TestId, @startDate, @endDate";
         return(connection.Query <int>(sqlExpression, testgroup).FirstOrDefault());
     }
 }
        public int SetTestForGroup(TestGroupDTO testgroup)   // метод - назначить тест - записать из круда
        {
            TestGroupCRUD teacher = new TestGroupCRUD();

            return(teacher.Add(testgroup));
        }