public void DeleteOrException(EmployeeClassification classification)
        {
            if (classification == null)
            {
                throw new ArgumentNullException(nameof(classification), $"{nameof(classification)} is null.");
            }

            var count = m_DataSource.Delete(classification).Execute();

            if (count == 0)
            {
                throw new MissingDataException();
            }
        }
        public void Delete(ReadOnlyEmployeeClassification classification)
        {
            if (classification == null)
            {
                throw new ArgumentNullException(nameof(classification), $"{nameof(classification)} is null.");
            }

            m_DataSource.Delete(classification).Execute();
        }
Beispiel #3
0
        public void Delete(EmployeeSimple employee)
        {
            if (employee == null)
            {
                throw new ArgumentNullException(nameof(employee), $"{nameof(employee)} is null.");
            }

            m_DataSource.Delete(employee).Execute();
        }
Beispiel #4
0
        public Task DeleteAsync(EmployeeClassification classification)
        {
            if (classification == null)
            {
                throw new ArgumentNullException(nameof(classification), $"{nameof(classification)} is null.");
            }

            return(m_DataSource.Delete(classification).ExecuteAsync());
        }
        public void Delete(EmployeeComplex employee)
        {
            if (employee == null)
            {
                throw new ArgumentNullException(nameof(employee), $"{nameof(employee)} is null.");
            }

            //The object is mapped to the view, so we need to override the table we write to.
            m_DataSource.Delete(employee).Execute();
        }
Beispiel #6
0
 public async Task DeleteAsync(EmployeeClassification classification)
 {
     await m_DataSource.Delete(classification).ExecuteAsync();
 }
 public void Delete(SimpleDepartment department)
 {
     m_DataSource.Delete(department).Execute();
 }
Beispiel #8
0
 public void Delete(EmployeeClassification classification)
 {
     m_DataSource.Delete(classification).Execute();
 }
Beispiel #9
0
 public void Delete(int employeeKey)
 {
     m_DataSource.Delete(TableName, new { @EmployeeKey = employeeKey }).Execute();
 }