Fungerande version av skiktad lösning Winforms App med SQlite och entity framework

This commit is contained in:
2023-08-23 21:25:09 +02:00
parent 1f39c39d96
commit 40632aa92c
17 changed files with 485 additions and 6 deletions

View File

@ -0,0 +1,26 @@
namespace WinFormDiApp.BL.Helpers;
public static class Extensions
{
public static bool IsNumeric(this string value)
{
if (!string.IsNullOrEmpty(value))
{
if (value.All(char.IsDigit)) return true;
else return false;
}
else return false;
}
public static bool IsDate(this string value) {
if (!string.IsNullOrEmpty(value) && value.Length<20)
{
if (DateTime.TryParse(value, out DateTime date))
{
return true;
}
else return false;
}
else return false;
}
}