/// <summary> /// Deletes a subject. /// </summary> /// <param name="idToDelete">The identifier.</param> /// <returns>The result.</returns> public ResultDto DeleteSubject(IdDto idToDelete) { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); SubjectServerService service = new SubjectServerService(); return service.DeleteSubject(idToDelete.Id, accountId); }
/// <summary> /// Deletes a subject. /// </summary> /// <param name="idToDelete">The identifier.</param> /// <returns>The result.</returns> public ResultDto DeleteSubject(IdDto idToDelete) { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); SubjectServerService service = new SubjectServerService(); return(service.DeleteSubject(idToDelete.Id, accountId)); }
/// <summary> /// Updates a subject. /// </summary> /// <param name="itemToSave">The item to save.</param> /// <returns>The result.</returns> public ResultDto UpdateSubject(SubjectEditDto itemToSave) { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); SubjectServerService service = new SubjectServerService(); return(service.UpdateSubject(itemToSave, accountId)); }
/// <summary> /// Returns the subject lookup. /// </summary> /// <returns>The subject lookup.</returns> public List <SubjectLookupDto> GetSubjectLookup() { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); SubjectServerService service = new SubjectServerService(); return(service.GetSubjectLookup(accountId)); }
public void TestCleanup() { this.service = null; }
public void TestInitialize() { this.service = new SubjectServerService(); }
/// <summary> /// Updates a subject. /// </summary> /// <param name="itemToSave">The item to save.</param> /// <returns>The result.</returns> public ResultDto UpdateSubject(SubjectEditDto itemToSave) { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); SubjectServerService service = new SubjectServerService(); return service.UpdateSubject(itemToSave, accountId); }
/// <summary> /// Returns the subject lookup. /// </summary> /// <returns>The subject lookup.</returns> public List<SubjectLookupDto> GetSubjectLookup() { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); SubjectServerService service = new SubjectServerService(); return service.GetSubjectLookup(accountId); }
public void TestInitialize() { this.service = new SubjectServerService(); }
public void TestCleanup() { this.service = null; }