Skip to content

Commit

Permalink
Code comments clean up for OSS
Browse files Browse the repository at this point in the history
  • Loading branch information
congysu committed Nov 3, 2014
1 parent f702229 commit abd8337
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private static async Task<object> FindEntity(SubmitContext context, DataModifica
// 1) it doesn't exist
// 2) concurrency checks have failed
// we should account for both - I can see 3 options:
// a. always return "PreConditionFailed" result - this is the canonical behavior of WebAPI odata (see http://blogs.msdn.com/b/webdev/archive/2014/03/13/getting-started-with-asp-net-web-api-2-2-for-odata-v4-0.aspx)
// a. always return "PreConditionFailed" result - this is the canonical behavior of WebAPI OData (see http://blogs.msdn.com/b/webdev/archive/2014/03/13/getting-started-with-asp-net-web-api-2-2-for-odata-v4-0.aspx)
// - this makes sense because if someone deleted the record, then you still have a concurrency error
// b. possibly doing a 2nd query with just the keys to see if the record still exists
// c. only query with the keys, and then set the DbEntityEntry's OriginalValues to the ETag values, letting the save fail if there are concurrency errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class NorthwindDomain : DbDomain<NorthwindContext>
{
public NorthwindContext Context { get { return DbContext; } }

// Imperative views. Currenly CUD operations not supported
// Imperative views. Currently CUD operations not supported
protected IQueryable<Product> ExpensiveProducts
{
get
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Domain/Query/DefaultQueryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public override Expression Visit(Expression node)
this._context.ReplaceVisitedNode(visited);
}

// Only visit the visited node's childen if
// Only visit the visited node's children if
// the visited node represents domain data
if (!(this._context.ModelReference is DomainDataReference))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public string SelectController(ODataPath odataPath, HttpRequestMessage request)
/// <returns>String corresponding to controller action name</returns>
public string SelectAction(ODataPath odataPath, HttpControllerContext controllerContext, ILookup<string, HttpActionDescriptor> actionMap)
{
// TODO: implement action selection for $link, navigation scenarios, etc.
// TODO: implement action selection for $ref, navigation scenarios, etc.

Ensure.NotNull(odataPath, "odataPath");
Ensure.NotNull(controllerContext, "controllerContext");
Expand All @@ -84,7 +84,7 @@ public string SelectAction(ODataPath odataPath, HttpControllerContext controller
return "PostAction";
}

//let WebAPI select default action
// Let WebAPI select default action
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void Initialize(TestContext context)
{
// The app.config file contains connections strings that are in reference to the DataDirectory, therefore the
// data directory needs to be initialized since the tests are not running within ASP.NET
// (http://msdn.microsoft.com/en-us/library/vstudio/cc716756(v=vs.100).aspx). The use of
// [http://msdn.microsoft.com/en-us/library/vstudio/cc716756(v=vs.100).aspx]. The use of
// DataDirectory avoids the need of an absolute path within the config file.
AppDomain.CurrentDomain.SetData("DataDirectory", Path.Combine(Directory.GetCurrentDirectory(), "App_Data"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void CURDEntity()
this.TestClientContext.SaveChanges();
int personId = person.PersonId;

//count this entity
// Count this entity
var count = this.TestClientContext.People.Count();
Assert.Equal(personId, count);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ private static EdmTypeReference GetReturnTypeReference(Type type)

private static EdmTypeReference GetTypeReference(Type type)
{
// Only handle primtive type right now

// Only handle primitive type right now
bool isNullable;
EdmPrimitiveTypeKind? primitiveTypeKind = EdmHelpers.GetPrimitiveTypeKind(type, out isNullable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static void ResetDataSource()
instance.Airlines.RemoveRange(instance.Airlines);
instance.Airports.RemoveRange(instance.Airports);
instance.Trips.RemoveRange(instance.Trips);
//This is to set the People Id from 0
// This is to set the People Id from 0
instance.Database.ExecuteSqlCommand("DBCC CHECKIDENT ('People', RESEED, 0)");
instance.Database.ExecuteSqlCommand("DBCC CHECKIDENT ('Flights', RESEED, 0)");
instance.Database.ExecuteSqlCommand("DBCC CHECKIDENT ('Trips', RESEED, 0)");
Expand Down

0 comments on commit abd8337

Please sign in to comment.