Example #1
0
 public bool DeleteElf(Guid id)
 {
     if (id == Guid.Empty)
     {
         throw ValidationExceptionFactory.Create(ServerMessages.Error_IdNotProvided, nameof(id));
     }
     return(_elvesEngine.DeleteElf(id));
 }
Example #2
0
 public ElfBO[] SearchWithFilters(string search)
 {
     if (string.IsNullOrEmpty(search))
     {
         throw ValidationExceptionFactory.Create(ServerMessages.Error_SearchStringProvided, nameof(search));
     }
     return(_elvesEngine.SearchWithFilters(search));
 }
Example #3
0
 public bool CreateElf(ElfBO elf)
 {
     if (string.IsNullOrEmpty(elf.Name))
     {
         throw ValidationExceptionFactory.Create(ServerMessages.Error_NameNotProvided, nameof(elf.Name));
     }
     return(_elvesEngine.CreateElf(elf));
 }