blob: 8fad6e39cbac4258d2ca363ca13c4474ec145b03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.DAL.Observables;
public static class ObservableEntityExtensions
{
public static T CloneEntity<T>(this T entity) where T : class, IObservableEntity
{
T cloned = entity.ShallowClone();
cloned.Guid = Guid.NewGuid().ToString();
cloned.LastUpdated = DateTime.Now;
return cloned;
}
}
|