c# - Unable to retrieve metadata for 'JMAP.Models.tempSource'. Keyword not supported 'data source' -
i using visual studio 2010 , entityframework version 5.0.0.0 trying create controller 'tempsource' table in oracle 11.2 , getting following error.
this code entity.
namespace jmap.models {
public class tempsource { public string systemname { get; set; } public string systemdesc { get; set; } public string userid { get; set; } } public class tempsourcedbcontext : dbcontext { public dbset<tempsource> tempsources { get; set; } }
}
add name="tempsourcedbcontext" connectionstring="user id=user_id;password=pwd;datasource=(description = (address_list = (address = (protocol = tcp)(host = hostname)(port = portnumber))) (connect_data = (service_name = dbname)))"
providername="system.data.oracleclient"
and have added above connection string in web.config file.
can me error.
it bad! following wrong approach. using code-first approach whereas wanted use data-first approach,but being new mvc , c# , got confused.
if needs mvc , beginner me, can go through following website databse design approaches. pretty useful.
http://www.asp.net/mvc/overview/getting-started/database-first-development/generating-views
moreover, can go through these videos, bit time consuming, gives understanding of mvc.
https://www.microsoftvirtualacademy.com/en-us/training-courses/introduction-to-asp-net-mvc-8322
hope helps!
Comments
Post a Comment