[{"data":1,"prerenderedAt":263},["ShallowReactive",2],{"article-xamarin-mac-agent-unable-to-connect":3},{"article":4,"tags":102,"previous":117,"next":198},{"id":5,"title":6,"author":7,"body":8,"createdAt":91,"description":92,"extension":93,"img":23,"meta":94,"navigation":95,"path":96,"seo":97,"stem":98,"tags":99,"updatedAt":91,"__hash__":101},"articles\u002Farticles\u002Fxamarin-mac-agent-unable-to-connect.md","Xamarin Mac Agent–Unable to connect","[object Object]",{"type":9,"value":10,"toc":87},"minimark",[11,35,44,59,71,81,84],[12,13,14,28,31,32,34],"p",{},[15,16,19],"a",{"style":17,"href":18},"display: none;","\u002Farticles\u002Fimages\u002Fopen-live-writer-0ed91d2b3197_8765-image_2.png",[20,21],"img",{"style":22,"src":23,"border":24,"alt":25,"title":25,"width":26,"height":27},"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;","\u002Farticles\u002Fimages\u002Fopen-live-writer-0ed91d2b3197_8765-image_thumb.png",0,"image",155,142,[29,30],"br",{},"\n ",[29,33],{},"\nI was unable to connect to Mac today.  Not sure why. ",[12,36,37,38,43],{},"I found this documentation from Xamarin ",[15,39,42],{"href":40,"target":41},"https:\u002F\u002Fdeveloper.xamarin.com\u002Fguides\u002Fios\u002Fgetting_started\u002Finstallation\u002Fwindows\u002Fconnecting-to-mac\u002F","_blank","here",". ",[12,45,46,47,50,51,53,54,31,56,58],{},"The document ",[15,48,42],{"href":49,"target":41},"https:\u002F\u002Fdeveloper.xamarin.com\u002Fguides\u002Fios\u002Fgetting_started\u002Finstallation\u002Fwindows\u002Fconnecting-to-mac\u002Ftroubleshooting\u002F"," gave me the solution.",[29,52],{},"\nOnce I did the following I was able to use the Xamarin Mac Agent (Visual Studio – Tools – iOS – Xamarin Mac Agent) to connect.",[29,55],{},[29,57],{},"\nNext, test if the ssh client from OpenSSH can connect successfully to the Mac from Windows. One way to install this program is to install",[12,60,61,65,66,70],{},[15,62,64],{"href":63},"https:\u002F\u002Fgit-for-windows.github.io\u002F","Git for Windows",". You can then start a ",[67,68,69],"strong",{},"Git Bash"," command prompt and attempt to ssh in to the Mac with your username and IP address",[12,72,73],{},[15,74,76],{"href":75},"\u002Farticles\u002Fimages\u002Fopen-live-writer-0ed91d2b3197_8765-image_4.png",[20,77],{"style":22,"src":78,"border":24,"alt":25,"title":25,"width":79,"height":80},"\u002Farticles\u002Fimages\u002Fopen-live-writer-0ed91d2b3197_8765-image_thumb_1.png",559,65,[12,82,83],{},"Once this was permanently added the Max Agent successfully connected. ",[12,85,86],{},"By the way I found SSH – I had Git for Windows installed, by opening GIT Shell.",{"title":88,"searchDepth":89,"depth":89,"links":90},"",2,[],"2017-01-18T02:46:11.6900000-05:00",null,"md",{},true,"\u002Farticles\u002Fxamarin-mac-agent-unable-to-connect",{"title":6,"description":92},"articles\u002Fxamarin-mac-agent-unable-to-connect",[100],"xamarin","NW9Sc0uSvm7zSo9Iy-Pw8OzJPVXNMr37ucc_BNMcgng",[103],{"id":104,"title":105,"body":106,"description":110,"extension":93,"img":111,"meta":112,"name":100,"navigation":95,"path":113,"seo":114,"stem":115,"__hash__":116},"tags\u002Ftags\u002Fxamarin.md","Xamarin",{"type":9,"value":107,"toc":108},[],{"title":88,"searchDepth":89,"depth":89,"links":109},[],"Xamarin is an open-source platform for building modern and performant applications for iOS, Android, and Windows with . NET. Xamarin is an abstraction layer that manages communication of shared code with underlying platform code.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fxamarin",{"description":110},"tags\u002Fxamarin","deVB66I7cJMtWvqybFh5POf9LBCBwHNe-5ZGMOzV5G4",{"id":118,"title":119,"author":7,"body":120,"createdAt":189,"description":190,"extension":93,"img":179,"meta":191,"navigation":95,"path":192,"seo":193,"stem":194,"tags":195,"updatedAt":189,"__hash__":197},"articles\u002Farticles\u002Fentity-framework-and-primary-keys.md","Entity Framework and Primary Keys",{"type":9,"value":121,"toc":187},[122,125,131,165,168,183],[12,123,124],{},"Entity Framework relies on primary keys with views and tables.  If you are trying to bring a view into dbContext, and the view does not have a primary key the following should help you out.  The schema object has to have primary key defined and it be set to not allow nulls (not-null).",[12,126,127,128,130],{},"The solution for me was to refashion my view definition using RowId like the following",[29,129],{},"\nThis will create a non-null RowId for each row in the result.",[132,133,137],"pre",{"className":134,"code":135,"language":136,"meta":88,"style":88},"language-sql shiki shiki-themes github-light github-dark","SELECT ISNULL(ROW_NUMBER() OVER(ORDER BY P1), -1) \nAS RowID, P1 AS Code, P3, P2\nFROM dbo.BigTable \nWHERE P1 IS NOT NULL\n","sql",[138,139,140,148,153,159],"code",{"__ignoreMap":88},[141,142,145],"span",{"class":143,"line":144},"line",1,[141,146,147],{},"SELECT ISNULL(ROW_NUMBER() OVER(ORDER BY P1), -1) \n",[141,149,150],{"class":143,"line":89},[141,151,152],{},"AS RowID, P1 AS Code, P3, P2\n",[141,154,156],{"class":143,"line":155},3,[141,157,158],{},"FROM dbo.BigTable \n",[141,160,162],{"class":143,"line":161},4,[141,163,164],{},"WHERE P1 IS NOT NULL\n",[12,166,167],{},"After you create the view take a look at the view definition within SQL Server Management Studio.  You should see that you have defined a column RowId which is non-null. ",[12,169,170,171,173],{},"This will satisfy Entity Framework and dbContext can now include a reference to these views or tables.",[29,172],{},[15,174,176],{"style":17,"href":175},"\u002Farticles\u002Fimages\u002Fopen-live-writer-entity-framework-and-primary-keys_eb29-ef_2.png",[20,177],{"style":178,"src":179,"border":24,"alt":180,"title":180,"width":181,"height":182},"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;","\u002Farticles\u002Fimages\u002Fopen-live-writer-entity-framework-and-primary-keys_eb29-ef_thumb.png","ef",240,154,[184,185,186],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":88,"searchDepth":89,"depth":89,"links":188},[],"2017-01-18T09:49:20.3800000-05:00","Entity Framework relies on primary keys with views and tables...",{},"\u002Farticles\u002Fentity-framework-and-primary-keys",{"title":119,"description":190},"articles\u002Fentity-framework-and-primary-keys",[196],"entityframework","LlkG54x3JZij2W3gLKsdJshQfKO6dv1t6tzMvSrv9wQ",{"id":199,"title":200,"author":7,"body":201,"createdAt":255,"description":256,"extension":93,"img":250,"meta":257,"navigation":95,"path":258,"seo":259,"stem":260,"tags":261,"updatedAt":255,"__hash__":262},"articles\u002Farticles\u002Ffind-all-tables-containing-column-with-specified-name.md","Find all tables containing column with specified name",{"type":9,"value":202,"toc":253},[203,206,243,251],[12,204,205],{},"In order to find a column name anywhere it is used in a table or view I was able to use the\nfollowing SQL…",[132,207,209],{"className":134,"code":208,"language":136,"meta":88,"style":88},"SELECT      COLUMN_NAME AS 'ColumnName'  \n            ,TABLE_NAME AS  'TableName'  \nFROM        INFORMATION_SCHEMA.COLUMNS  \nWHERE       COLUMN_NAME LIKE '%columnnameyouarelookingfor%'  \nORDER BY    TableName  \n            ,ColumnName;  \n",[138,210,211,216,221,226,231,237],{"__ignoreMap":88},[141,212,213],{"class":143,"line":144},[141,214,215],{},"SELECT      COLUMN_NAME AS 'ColumnName'  \n",[141,217,218],{"class":143,"line":89},[141,219,220],{},"            ,TABLE_NAME AS  'TableName'  \n",[141,222,223],{"class":143,"line":155},[141,224,225],{},"FROM        INFORMATION_SCHEMA.COLUMNS  \n",[141,227,228],{"class":143,"line":161},[141,229,230],{},"WHERE       COLUMN_NAME LIKE '%columnnameyouarelookingfor%'  \n",[141,232,234],{"class":143,"line":233},5,[141,235,236],{},"ORDER BY    TableName  \n",[141,238,240],{"class":143,"line":239},6,[141,241,242],{},"            ,ColumnName;\n",[15,244,247],{"style":245,"href":246},"display:none","\u002Farticles\u002Fimages\u002Fopen-live-writer-f5f906eb5cd0_bcd7-sql_2.png",[20,248],{"title":136,"style":249,"border":24,"alt":136,"src":250,"width":181,"height":181},"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px;display='none';","\u002Farticles\u002Fimages\u002Fopen-live-writer-f5f906eb5cd0_bcd7-sql_thumb.png",[184,252,186],{},{"title":88,"searchDepth":89,"depth":89,"links":254},[],"2017-01-14T06:29:42.0000000-05:00","Find a column name anywhere.",{},"\u002Farticles\u002Ffind-all-tables-containing-column-with-specified-name",{"title":200,"description":256},"articles\u002Ffind-all-tables-containing-column-with-specified-name",[136],"D4x_b6dLDTOhJk_oDi11rJkwS-ARV4n6opJh-YLJXvE",1781574770773]