I have one application which is finished and working. But recently arrived security instruction that every DB access have to be done via stored procedures and it applies for users and applications too.
This application run at ASP .NET MVC framework (version 4) and have ORM declared this kind of way
[Table("TableName1")]
public class TableName1
{
[Key]
public int ID { get; set; }
[MaxLength(250), Index("IX_NameCountry", 1, IsUnique = true, IsClustered = false)]
public string Name { get; set; }
...
}
public ICollection<TableName2> TableName2
{
get
{
return Database.SqlQuery<TableName2>("SELECT * FROM dbo.TableName2").ToList();
}
}
Im beginner with MVC and EF, but i found that EF6 support stored procedure mapping. What is the easiest way of rewriting the application ? I would very thankful for one example how i can remap the table mapping :-)
thank you