Last post Jan 07, 2017 09:01 AM by Zhi Lv - MSFT
Dec 31, 2016 02:36 AM|madjester|LINK
I created a project in Visual Studio 2012 and installed EF 6.1.3 in it. I'm trying to use the AddRange() and RemoveRange() methods of the DbSet class but it appears they are missing.
I have already added System.Data.Entity reference in my code. Am I missing some other references?
Dec 31, 2016 06:41 AM|sakthivel0531|LINK
AddRange and RemoveRange are methods of System.Collections.Generic class. So, try add "using System.Collections.Generic".
Dec 31, 2016 06:50 AM|madjester|LINK
Hi, thanks for replying. The AddRange and RemoveRange methods in my case are methods of the DbSet class, and System.Collections.Generic is already referenced in my code.
Jan 07, 2017 09:01 AM|Zhi Lv - MSFT|LINK
AddRange RemoveRange Methods Missing
Based on your description, I test it on my side, it seems that everything works well.
I suggest you could try to reinstall the EF reference using "Manage NuGet Packages" option.