This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clear-Host | |
| $WebsiteDir = "G:\Websites\DemoApp" | |
| [string[]] $ACLPerms = "Administrators", "IIS_IUSRS", "IUSR" | |
| #Assign the ACL Permissions | |
| foreach ($permission in $ACLPerms) | |
| { | |
| $AccessRule =New-Object System.Security.AccessControl.FileSystemAccessRule($permission,"FullControl","ContainerInherit,ObjectInherit","InheritOnly","Allow") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Team | |
| { | |
| public int TeamId { get; set;} | |
| public string Name { get; set; } | |
| [InverseProperty("HomeTeam")] | |
| public virtual ICollection<Match> HomeMatches { get; set; } | |
| [InverseProperty("GuestTeam")] | |
| public virtual ICollection<Match> AwayMatches { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Team | |
| { | |
| public int TeamId { get; set;} | |
| public string Name { get; set; } | |
| public virtual ICollection<Match> HomeMatches { get; set; } | |
| public virtual ICollection<Match> AwayMatches { get; set; } | |
| } | |
| public class Match |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <connectionStrings> | |
| <add name="BlogContext" | |
| providerName="System.Data.SqlClient" | |
| connectionString="Server=.\SQLEXPRESS;Database=Blogging;Integrated Security=True;"/> | |
| </connectionStrings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <connectionStrings> | |
| <add name="BlogContext" | |
| connectionString="metadata=res://*/BloggingModel.csdl| | |
| res://*/BloggingModel.ssdl| | |
| res://*/BloggingModel.msl; | |
| provider=System.Data.SqlClient | |
| provider connection string= | |
| "data source=(localdb)\v11.0; | |
| initial catalog=Blogging; | |
| integrated security=True; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Route("{id:int}")] | |
| [HttpGet] | |
| public IHttpActionResult GetById(int id) | |
| { | |
| try | |
| { | |
| return Ok(_myRepository.GetById(id)); | |
| } | |
| catch (Exception ex) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <configuration> | |
| <connectionStrings> | |
| <add name="OracleDatabase" connectionString="Data Source=ORCL;User Id=myUsername;Password=myPassword;" providerName="Oracle.ManagedDataAccess.Client" /> | |
| </connectionStrings> | |
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <configuration> | |
| <connectionStrings> | |
| <add name="OracleDatabase" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SID=MyOracleSID)));User Id=myUsername;Password=myPassword;" providerName="Oracle.ManagedDataAccess.Client" /> | |
| </connectionStrings> | |
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Web.Mvc; | |
| public ActionResult RedirectToStronglyTypedAction | |
| { | |
| return this.RedirectToAction(c => c.Index(myId)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return RedirectToAction("Index", new { id = myId }); |
NewerOlder