using Luticate2.Utils.Business; using Luticate2.Utils.Dbo; using Luticate2.Utils.Dbo.Result; using Test.Utils.DataAccess; using Test.Utils.Dbo.PkGuid; namespace WebTest.Business { public class PkGuidBusiness : LuCrudBusiness { public PkGuidBusiness(LuUtilsPkGuidDataAccess dataAccess) : base(dataAccess) { } protected override LuResult CheckAdd(PkGuidAddDbo obj) { if (obj.SomeText.EndsWith("_edited")) { return LuResult.Error(LuStatus.InputError, "someText can not end with '_edited'"); } return LuResult.Ok(obj); } protected override LuResult CheckEdit(PkGuidDbo dbo, PkGuidAddDbo update) { if (!update.SomeText.EndsWith("_edited")) { return LuResult.Error(LuStatus.InputError, "someText must end with '_edited'"); } return LuResult.Ok(update); } } }