Click here to Skip to main content
11,576,635 members (58,104 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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:58am
Edited 26-Nov-12 2:41am
(no name)2.2K
v4

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 251
1 Abhinav S 170
2 DamithSL 105
3 Lucifier Rocks 105
4 Dave Kreskowiak 80
0 OriginalGriff 715
1 Sergey Alexandrovich Kryukov 631
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 365


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100