示例#1
0
        public async Task <Result <Unit, SaveWarrantyCaseVerificationFailure> > SaveWarrantyCaseVerification(
            WarrantyCaseVerification warrantyCaseVerification)
        {
            try
            {
                ComprehensiveDataDbContext.WarrantyCaseVerification.Add(warrantyCaseVerification);
                await ComprehensiveDataDbContext.SaveChangesAsync();

                return(new Result <Unit, SaveWarrantyCaseVerificationFailure>(Unit.Value));
            }
            catch (Exception e)
            {
                return(new Result <Unit, SaveWarrantyCaseVerificationFailure>(
                           new SaveWarrantyCaseVerificationFailure(
                               e.Message)));
            }
        }
 public WarrantyCaseVerificationTestSetup(WarrantyCaseVerification warrantyCaseVerification)
 {
     WarrantyCaseVerification = warrantyCaseVerification;
 }