public async Task <byte[]> GetTextureAsync(int worldId, string textureName) { using (var context = new ObjectPathContext()) { return(await _textureLocator.GetResourceAsync(await context.Textures.SingleOrDefaultAsync(entity => entity.WorldId == worldId && entity.Name == textureName))); } }
public async Task <Animation> GetAnimationAsync(int worldId, string animationName) { using (var context = new ObjectPathContext()) { return(await _animationLocator.GetResourceAsync(await context.Animations.SingleOrDefaultAsync(entity => entity.WorldId == worldId && entity.Name == animationName))); } }
public async Task <Model> GetModelAsync(int worldId, string modelName) { using (var context = new ObjectPathContext()) { return(await _modelLocator.GetResourceAsync(await context.Models.SingleOrDefaultAsync(entity => entity.WorldId == worldId && entity.Name == modelName))); } }