DD.WellWorkover.Cloud/AsbCloudWebApi.Tests/CommonExtensions.cs

20 lines
342 B
C#
Raw Normal View History

using Mapster;
using System;
namespace AsbCloudWebApi.Tests;
public static class CommonExtensions
{
public static T Copy<T>(this T obj)
{
var copy = obj.Adapt<T>();
return copy;
}
public static T Mutate<T>(this T obj, Action<T> mutation)
{
var copy = obj.Copy();
return copy;
}
}