public static NetworkModel CreateNew(string name, string description, Guid ownerId) { NetworkAccessModel readAccess = NetworkAccessModel.CreateNew(); NetworkAccessModel writeAccess = NetworkAccessModel.CreateNew(); return(new NetworkModel( Guid.NewGuid(), name, description, DateTimeOffset.UtcNow, ownerId, readAccess, writeAccess)); }
private NetworkModel( Guid id, string name, string description, DateTimeOffset createdDate, Guid ownerId, NetworkAccessModel readAccess, NetworkAccessModel writeAccess) { Id = id; Name = name; Description = description; CreatedDate = createdDate; OwnerId = ownerId; ReadAccess = readAccess; WriteAccess = writeAccess; }