Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created January 29, 2017 23:40
Show Gist options
  • Save renatogroffe/859540684d5d14111f0b46409b74db14 to your computer and use it in GitHub Desktop.
Save renatogroffe/859540684d5d14111f0b46409b74db14 to your computer and use it in GitHub Desktop.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TesteViewComponent.ViewComponents
{
public class ListaViewComponent : ViewComponent
{
public async Task<IViewComponentResult> InvokeAsync(
string sequencia)
{
var valores = await Task.FromResult(
sequencia.Split(new char[] { '|' }));
return View(valores);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment