You don't really use Kentico with Entity Framework.
Kentico has it's own built in "Entity Framework," each class usually has an ____Info
class and ____InfoProvider
, these provide the strongly typed representation of the classes with CRUD methods in them, along with the ____InfoProvider
class has Linq-to-SQL like syntax.
For example,
RoleInfoProvider.GetRoles().WhereIn("RoleName", MyListOfRoleNames).Select(x => ((RoleInfo)x).RoleDisplayName).ToList();
RoleInfo MyNewRole = New RoleInfo();
MyNewRole.RoleName = "TempRole";
MyNewRole.RoleDisplayName = "Temp Role";
MyNewRole.Insert(); // Or RoleInfoProvider.Update(MyNewRole);