c# - Entity Framework - How do I combine data from a database and something else, like WMI? -


i playing around writing simple app asks servermanager in microsoft.web.administration list of web sites configured on local machine , combines annotations in sort of database.

namespace listwebsites.models {     public class site     {         public int id { get; set; }         public string hostname { get; set; }         public string protocol { get; set; }         public int? port { get; set; }         public string comments { get; set; }     }      public class sitedbcontext : dbcontext     {         public dbset<site> sites { get; set; }          public void getsiteinfo()         {             using (var server = new servermanager())             {                 var siteinfo = site in server.sites                                let bindings = site.bindings.select(b => new { host = b.host, protocol = b.protocol, port = b.endpoint?.port })                                select new { site.name, bindings };              }         }     } } 

i want id, comments come database , hostname, protocol , port come servermanager.

my brain broken trying figure out right way is? should combine data inside sitedbcontext overriding methods? should wrap sitedbcontext in else joins data?

i'm kind of n00b entity framework...maybe shouldn't trying entity framework? not sure how google solution this.


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -