Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ADO.NET
Hi guys,
 
I want to give support for the conversion of nullable foreign key to required foreign key.
 
I got the scenario here below
 
public class CustomSQLGenerator : SqlServerMigrationSqlGenerator
{
	protected override void Generate(AlterColumnOperation alterColumnOperation)
	{
    		var old = (System.Data.Entity.Migrations.Model.AlterColumnOperation)(alterColumnOperation.Inverse)).Column;
    		var column = alterColumnOperation.Column;
 
    		if (column.ClrType == typeof(Guid) && old.IsNullable == null && 
column.IsNullable == false)
    		{
 
    		}
	}
 
}
 
Even that i got the scenario but, i am still not clear what to be done.
 
Guys help me with the solution
Posted 26 Nov '12 - 1:58
Edited 26 Nov '12 - 2:41


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 355
1 Sergey Alexandrovich Kryukov 338
2 Arun Vasu 315
3 Maciej Los 208
4 Aarti Meswania 180
0 Sergey Alexandrovich Kryukov 9,755
1 OriginalGriff 7,549
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid