DBTableCreateNewUcConstraintIfNecessary Method  | 
 
            Creates a new uc constraint if necessary on the fields specified. If there's already an existing UC however it's marked as deleted, it's
            unmarked as deleted.
            
 
    Namespace: 
   SD.LLBLGen.Pro.DBDriverCore
    Assembly:
   SD.LLBLGen.Pro.DBDriverCore (in SD.LLBLGen.Pro.DBDriverCore.dll) Version: 5.7.0.0 (5.7.0)
Syntaxpublic DBUniqueConstraint CreateNewUcConstraintIfNecessary(
	List<IProjectElementFieldMapTargetElement> fields,
	string ucName,
	Action<string> messageReportingFunc,
	bool forModelOnlyRelationship,
	out bool created
)
Public Function CreateNewUcConstraintIfNecessary ( 
	fields As List(Of IProjectElementFieldMapTargetElement),
	ucName As String,
	messageReportingFunc As Action(Of String),
	forModelOnlyRelationship As Boolean,
	<OutAttribute> ByRef created As Boolean
) As DBUniqueConstraint
Parameters
- fields
 - Type: System.Collections.GenericListIProjectElementFieldMapTargetElement
The fields. - ucName
 - Type: SystemString
Name of the uc. Name is created from settings though not made unique across the db. - messageReportingFunc
 - Type: SystemActionString
The message reporting func. If specified, it is used to report a normal message to calling code's outer structures - forModelOnlyRelationship
 - Type: SystemBoolean
if set to true the uc is for a model-only relationship and only an existing uc is selected - created
 - Type: SystemBoolean
if set to true the UC was newly created. False otherwise. 
Return Value
Type: 
DBUniqueConstraint
Exceptions| Exception | Condition | 
|---|
| ArgumentException | One or more fields passed in isn't part of the table '{0}' | 
See Also