Esempio n. 1
0
 public Task <TResult> SelectVmmServerCollectionAsync <TResult>(
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.SelectVmmServerCollectionProc,
                translateFunc,
                SqlCommandFactory.SelectVmmServerCollectionParameters()));
 }
Esempio n. 2
0
 public Task <TResult> SelectProtetionGroupsBySubscriptionAsync <TResult>(
     Guid subscriptionId,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.SelectProtetionGroupsBySubscriptionProc,
                translateFunc,
                SqlCommandFactory.SelectProtetionGroupsBySubscriptionParameters(subscriptionId)));
 }
Esempio n. 3
0
 public Task <TResult> SelectServerGroupByIdAsync <TResult>(
     Guid groupId,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.SelectServerGroupByIdProc,
                translateFunc,
                SqlCommandFactory.SelectServerGroupByIdParameters(groupId)));
 }
Esempio n. 4
0
 public Task <TResult> SelectProtetionGroupByVirtualmachineAsync <TResult>(
     Guid subscriptionId,
     Guid hyperVId,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.SelectProtectionGroupByVirtualMachineProc,
                translateFunc,
                SqlCommandFactory.SelectProtectionGroupByVirtualMachineParameters(subscriptionId, hyperVId)));
 }
Esempio n. 5
0
 public Task <TResult> InsertServerGroupAsync <TResult>(
     Guid groupId,
     string groupName,
     bool azureBackupEnabled,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.InsertServerGroupProc,
                translateFunc,
                SqlCommandFactory.InsertServerGroupParameters(groupId, groupName, azureBackupEnabled)));
 }
Esempio n. 6
0
 public Task <TResult> UpdateBackupServerAsync <TResult>(
     Guid serverId,
     string userName,
     byte[] password,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.UpdateBackupServerProc,
                translateFunc,
                SqlCommandFactory.UpdateBackupServerParameters(serverId, userName, password)));
 }
Esempio n. 7
0
 public Task <TResult> InsertOrUpdateSpfServerAsync <TResult>(
     string adminUrl,
     string userName,
     byte[] password,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.InsertOrUpdateSpfServerProc,
                translateFunc,
                SqlCommandFactory.InsertOrUpdateSpfServerParameters(adminUrl, userName, password)));
 }
Esempio n. 8
0
 public Task <TResult> InsertVirtaulMachineRecordAsync <TResult>(
     Guid subscriptionId,
     Guid vmmId,
     Guid hyperVId,
     string vmName,
     Func <SqlDataReader, TResult> translateFunc) where TResult : class
 {
     return(this.ExecuteProcedureReaderAsync <TResult>(
                SqlCommandFactory.InsertVirtualMachineRecordProc,
                translateFunc,
                SqlCommandFactory.InsertVirtualMachineRecordParameters(subscriptionId, vmmId, hyperVId, vmName)));
 }
Esempio n. 9
0
 public Task UpdateVirtualMachineActionStateAsync(Guid subscriptionId, Guid hyperVId, int actionStateId)
 {
     return(this.ExecuteNonQueryProcedureAsync(
                SqlCommandFactory.UpdateVirtualMachineActionStateProc,
                SqlCommandFactory.UpdateirtualMachineActionStateParameters(subscriptionId, hyperVId, actionStateId)));
 }
Esempio n. 10
0
 public Task DeleteVirtualMachineRecordAsync(Guid subscriptionId, Guid hyperVId)
 {
     return(this.ExecuteNonQueryProcedureAsync(
                SqlCommandFactory.DeleteVirtualMachineRecordProc,
                SqlCommandFactory.DeleteVirtualMachineRecordParameters(subscriptionId, hyperVId)));
 }
Esempio n. 11
0
 public Task DeleteServerGroupAsync(Guid groupId)
 {
     return(this.ExecuteNonQueryProcedureAsync(
                SqlCommandFactory.DeleteServerGroupProc,
                SqlCommandFactory.DeleteServerGroupParameters(groupId)));
 }
Esempio n. 12
0
 public Task DeleteBackupServerAsync(Guid serverId)
 {
     return(this.ExecuteNonQueryProcedureAsync(
                SqlCommandFactory.DeleteBackupServerProc,
                SqlCommandFactory.DeleteBackupServerParameters(serverId)));
 }