Skip to content

Instantly share code, notes, and snippets.

Created December 29, 2020 15:43
What would you like to do?
using Microsoft.AspNetCore.Mvc;
namespace RandomNumberGenerator.Controllers
public class RandomNumberController : ControllerBase
public IActionResult Get()
Random rnd = new Random();
var randomNumber = rnd.Next(9999999).ToString();
return Ok($"Your random number is {randomNumber}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment