JPB.DataAccess.Helper.LocalDb.LocalDbManager.AddMapping C# (CSharp) Method

AddMapping() private method

private AddMapping ( Type source, Type target ) : void
source System.Type
target System.Type
return void
		internal void AddMapping(Type source, Type target)
		{
			_mappings.Add(new ReproMappings(source, target));
		}

Usage Example

        private void DatabaseDatabaseOnSetupDone(object sender, EventArgs eventArgs)
        {
            ReposetoryCreated = false;
            lock (LockRoot)
            {
                foreach (var dbPropertyInfoCach in _typeInfo.Propertys)
                {
                    if (dbPropertyInfoCach.Value.ForginKeyDeclarationAttribute != null &&
                        dbPropertyInfoCach.Value.ForginKeyDeclarationAttribute.Attribute.ForeignType != null)
                    {
                        _databaseDatabase.AddMapping(_typeInfo.Type,
                                                     dbPropertyInfoCach.Value.ForginKeyDeclarationAttribute.Attribute.ForeignType);
                    }
                }

                ReposetoryCreated = true;
            }
        }