c# - Why is the Up() method abstract and the Down() method virtual in the DbMigration class -


if @ signature of abstract class dbmigration in system.data.entity.migrations namespace:

public virtual void down(); public abstract void up(); 

you'll see down() marked virtual , up marked abstract. difference between virtual , abstract abstract function can have functionality in it.

what kind of functionality can up() function have default , why isn't case th down() function.

you need override up() while overriding down() optional. makes sense database migration instructions.

see what difference between abstract function , virtual function?.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -