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