SqlSugar/Src/Asp.Net/SqlServerTest/UnitTest/UValidate.cs

20 lines
413 B
C#
Raw Normal View History

2019-05-18 10:11:50 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
2019-05-18 10:56:33 +08:00
public class UValidate
2019-05-18 10:11:50 +08:00
{
2019-05-18 10:55:28 +08:00
public static void Check(object a, object b, object name)
2019-05-18 10:11:50 +08:00
{
if (a?.ToString()?.Trim() != b?.ToString()?.Trim())
2019-05-18 10:11:50 +08:00
{
2019-05-18 10:55:28 +08:00
throw new Exception(name + " error");
2019-05-18 10:11:50 +08:00
}
}
}
}