public static NamedEntity CreateNamedEntity(NamedEntityType net, NamedEntity existing) { return CreateNamedEntity(net, existing, null); }
public static NamedEntity CreateNamedEntity(NamedEntityType net, NamedEntity existing, int? initial) { var ne = existing ?? new NamedEntity(); ne.Id = Guid.NewGuid(); ne.UserNameCreate = "Tester_" + _random.Next(3, 10); ne.TimeCreate = DateTime.UtcNow; ne.IsCanceled = _random.Next(0, 1) != 0; ne.Description = "Description_" + _random.Next(3, 100); ne.Name = "Name_" + (initial.HasValue ? initial :_random.Next(3, 100)); ne.NamedEntityType = net; return ne; }