Last active
October 23, 2020 08:29
-
-
Save kasajian/5cdf5fb7e5dd1ad14f8682dbfa33e3e4 to your computer and use it in GitHub Desktop.
ValueObject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConnectionString | |
{ | |
public string Value { get; private set; } | |
public ConnectionString(string value) | |
{ | |
Value = value; | |
} | |
public static implicit operator string(ConnectionString connectionString) | |
{ | |
return connectionString.Value; | |
} | |
public static implicit operator ConnectionString(string value) | |
{ | |
return new ConnectionString(value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment