use expression bodies
This commit is contained in:
@ -7,10 +7,7 @@ namespace BinaryDad.Notes.Controllers
|
||||
{
|
||||
private readonly INoteService noteService;
|
||||
|
||||
public ApiController(INoteService noteService)
|
||||
{
|
||||
this.noteService = noteService;
|
||||
}
|
||||
public ApiController(INoteService noteService) => this.noteService = noteService;
|
||||
|
||||
public string Note() => noteService.Get();
|
||||
}
|
||||
|
@ -9,10 +9,7 @@ public class NoteController : Controller
|
||||
{
|
||||
private readonly INoteService noteService;
|
||||
|
||||
public NoteController(INoteService noteService)
|
||||
{
|
||||
this.noteService = noteService;
|
||||
}
|
||||
public NoteController(INoteService noteService) => this.noteService = noteService;
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
|
Reference in New Issue
Block a user