From 36f9fb6654c82fd4b6d2dd9c6d9a2cf77f5e36ba Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Sun, 4 Jul 2021 14:37:57 +0200 Subject: [PATCH] Simplify CalculatedEnd --- BlazorApp/Data/Calendar.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/BlazorApp/Data/Calendar.cs b/BlazorApp/Data/Calendar.cs index abafcb4..20485c7 100644 --- a/BlazorApp/Data/Calendar.cs +++ b/BlazorApp/Data/Calendar.cs @@ -18,15 +18,7 @@ namespace BlazorApp.Data public string Description { get; set; } public TimeSpan? Duration { get; set; } - public DateTime? CalculatedEnd - { - get - { - if (Duration != null) - return DtStart + Duration; - return DtEnd; - } - } + public DateTime? CalculatedEnd => DtEnd ?? DtStart + Duration; } public class Calendar