public async Task AddAsync(JsonModel model) { await Task.Run(async() => { switch (model.GetType().Name) { case "User": await jsonService.AddAsync(_userRepository, model); break; case "Permission": await jsonService.AddAsync(_userRoleRepository, model); break; } }); }