Fixed SPA after Json.NET integration into WebAPI.
This commit is contained in:
Родитель
b098238ccf
Коммит
dae3d6c7ee
|
@ -77,6 +77,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Web.Http.Data.Ent
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Web.Http.Data.Test", "test\Microsoft.Web.Http.Data.Test\Microsoft.Web.Http.Data.Test.csproj", "{81876811-6C36-492A-9609-F0E85990FBC9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Web.Http.Data.Helpers.Test", "test\Microsoft.Web.Http.Data.Helpers.Test\Microsoft.Web.Http.Data.Helpers.Test.csproj", "{F6C0671C-B832-4807-BA9A-9206BD35A650}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.Integration.Test", "test\System.Web.Http.Integration.Test\System.Web.Http.Integration.Test.csproj", "{3267DFC6-B34D-4011-BC0F-D3B56AF6F608}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.WebHost.Test", "test\System.Web.Http.WebHost.Test\System.Web.Http.WebHost.Test.csproj", "{EA62944F-BD25-4730-9405-9BE8FF5BEACD}"
|
||||
|
@ -246,6 +248,10 @@ Global
|
|||
{81876811-6C36-492A-9609-F0E85990FBC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{81876811-6C36-492A-9609-F0E85990FBC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{81876811-6C36-492A-9609-F0E85990FBC9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F6C0671C-B832-4807-BA9A-9206BD35A650}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F6C0671C-B832-4807-BA9A-9206BD35A650}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F6C0671C-B832-4807-BA9A-9206BD35A650}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F6C0671C-B832-4807-BA9A-9206BD35A650}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3267DFC6-B34D-4011-BC0F-D3B56AF6F608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3267DFC6-B34D-4011-BC0F-D3B56AF6F608}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3267DFC6-B34D-4011-BC0F-D3B56AF6F608}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -320,6 +326,7 @@ Global
|
|||
{A7B1264E-BCE5-42A8-8B5E-001A5360B128} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
{6C18CC83-1E4C-42D2-B93E-55D6C363850C} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
{81876811-6C36-492A-9609-F0E85990FBC9} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
{F6C0671C-B832-4807-BA9A-9206BD35A650} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
{3267DFC6-B34D-4011-BC0F-D3B56AF6F608} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
{EA62944F-BD25-4730-9405-9BE8FF5BEACD} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
{7B8601F8-8D1F-4B9C-8C20-772B673A2FA6} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
|
||||
|
|
|
@ -41,9 +41,10 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
return metadata;
|
||||
}
|
||||
|
||||
private static string EncodeTypeName(string typeName, string typeNamespace)
|
||||
internal static string EncodeTypeName(Type type)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "{0}{1}{2}", typeName, MetadataStrings.NamespaceMarker, typeNamespace);
|
||||
// This format matches that employed by Json.NET. We assume that DataController uses Json.NET for JSON serialization.
|
||||
return String.Format(CultureInfo.InvariantCulture, "{0}.{1},{2}", type.Namespace, type.Name, type.Assembly.GetName().Name);
|
||||
}
|
||||
|
||||
private static class MetadataStrings
|
||||
|
@ -71,11 +72,10 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
public TypeMetadata(Type entityType)
|
||||
{
|
||||
Type type = TypeUtility.GetElementType(entityType);
|
||||
TypeName = type.Name;
|
||||
TypeNamespace = type.Namespace;
|
||||
ClrType = type;
|
||||
|
||||
IEnumerable<PropertyDescriptor> properties =
|
||||
TypeDescriptor.GetProperties(entityType).Cast<PropertyDescriptor>().OrderBy(p => p.Name)
|
||||
TypeDescriptor.GetProperties(type).Cast<PropertyDescriptor>().OrderBy(p => p.Name)
|
||||
.Where(p => TypeUtility.IsDataMember(p));
|
||||
|
||||
foreach (PropertyDescriptor pd in properties)
|
||||
|
@ -88,12 +88,11 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
}
|
||||
}
|
||||
|
||||
public string TypeName { get; private set; }
|
||||
public string TypeNamespace { get; private set; }
|
||||
public Type ClrType { get; private set; }
|
||||
|
||||
public string EncodedTypeName
|
||||
{
|
||||
get { return EncodeTypeName(TypeName, TypeNamespace); }
|
||||
get { return EncodeTypeName(ClrType); }
|
||||
}
|
||||
|
||||
public IEnumerable<string> Key
|
||||
|
@ -200,8 +199,7 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
Type elementType = TypeUtility.GetElementType(descriptor.PropertyType);
|
||||
IsArray = !elementType.Equals(descriptor.PropertyType);
|
||||
// TODO: What should we do with nullable types here?
|
||||
TypeName = elementType.Name;
|
||||
TypeNamespace = elementType.Namespace;
|
||||
ClrType = elementType;
|
||||
|
||||
AttributeCollection propertyAttributes = TypeDescriptorExtensions.ExplicitAttributes(descriptor);
|
||||
|
||||
|
@ -254,8 +252,7 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
}
|
||||
|
||||
public string Name { get; private set; }
|
||||
public string TypeName { get; private set; }
|
||||
public string TypeNamespace { get; private set; }
|
||||
public Type ClrType { get; private set; }
|
||||
public bool IsReadOnly { get; private set; }
|
||||
public bool IsArray { get; private set; }
|
||||
public TypePropertyAssociationMetadata Association { get; private set; }
|
||||
|
@ -269,7 +266,7 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
{
|
||||
JObject value = new JObject();
|
||||
|
||||
value[MetadataStrings.TypeString] = EncodeTypeName(TypeName, TypeNamespace);
|
||||
value[MetadataStrings.TypeString] = EncodeTypeName(ClrType);
|
||||
|
||||
if (IsReadOnly)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
DataControllerMetadataGenerator.GetMetadata(description);
|
||||
|
||||
JToken metadataValue = new JObject(metadata.Select(
|
||||
m => new KeyValuePair<string, JToken>(m.EncodedTypeName, m.ToJToken())));
|
||||
m => new JProperty(m.EncodedTypeName, m.ToJToken())));
|
||||
|
||||
return htmlHelper.Raw(metadataValue);
|
||||
}
|
||||
|
|
|
@ -142,10 +142,9 @@ namespace Microsoft.Web.Http.Data.Helpers
|
|||
return string.Format(CultureInfo.InvariantCulture, "{{{0}}}", string.Join(",", clientMappingStrings));
|
||||
}
|
||||
|
||||
// TODO: Duplicated from DataControllerMetadataGenerator.cs. Refactor when combining this into the main System.Web.Http.Data.Helper assembly.
|
||||
private static string EncodeServerTypeName(Type type)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "{0}{1}{2}", type.Name, ":#", type.Namespace);
|
||||
return DataControllerMetadataGenerator.EncodeTypeName(type);
|
||||
}
|
||||
|
||||
private class DataSourceConfig<TDataController> : IDataSourceConfig where TDataController : DataController
|
||||
|
|
|
@ -209,6 +209,12 @@
|
|||
}
|
||||
};
|
||||
|
||||
upshot.ChangeKind = {
|
||||
Add: "Add",
|
||||
Update: "Update",
|
||||
Delete: "Delete"
|
||||
};
|
||||
|
||||
///#DEBUG
|
||||
upshot.assert = function (cond, msg) {
|
||||
if (!cond) {
|
||||
|
|
|
@ -192,7 +192,7 @@
|
|||
|
||||
commitChanges: function (options, success, error) {
|
||||
/// <summary>
|
||||
/// Initiates an asynchronous commit of any model data edits collected by this DataContext.
|
||||
/// Initiates an asynchronous commit of any model data changes collected by this DataContext.
|
||||
/// </summary>
|
||||
/// <param name="success" type="Function" optional="true">
|
||||
/// A success callback.
|
||||
|
@ -211,7 +211,7 @@
|
|||
|
||||
revertChanges: function () {
|
||||
/// <summary>
|
||||
/// Reverts any edits to model data (to entities) back to original entity values.
|
||||
/// Reverts any changes to model data (to entities) back to original entity values.
|
||||
/// </summary>
|
||||
/// <returns type="upshot.DataContext"/>
|
||||
|
||||
|
@ -233,20 +233,10 @@
|
|||
includedEntities = includedEntities || {};
|
||||
|
||||
$.each(entities, function (unused, entity) {
|
||||
// apply type info to the entity instances
|
||||
// TODO: Do we want this to go through the compatibility layer?
|
||||
obs.setProperty(entity, "__type", type);
|
||||
|
||||
self.__flatten(entity, type, includedEntities);
|
||||
});
|
||||
|
||||
$.each(includedEntities, function (type, entities) {
|
||||
$.each(entities, function (unused, entity) {
|
||||
// apply type info to the entity instances
|
||||
// TODO: Do we want this to go through the compatibility layer?
|
||||
obs.setProperty(entity, "__type", type);
|
||||
});
|
||||
|
||||
var entitySet = self.getEntitySet(type);
|
||||
entitySet.__loadEntities(entities);
|
||||
});
|
||||
|
@ -310,6 +300,10 @@
|
|||
var dataProvider = this._dataProvider,
|
||||
self = this,
|
||||
onSuccess = function (result) {
|
||||
if (self._isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// add metadata if specified
|
||||
if (result.metadata) {
|
||||
upshot.metadata(result.metadata);
|
||||
|
@ -339,7 +333,9 @@
|
|||
success.call(self, self.getEntitySet(entityType), mergedEntities, result.totalCount);
|
||||
},
|
||||
onError = function (httpStatus, errorText, context) {
|
||||
error.call(self, httpStatus, errorText, context);
|
||||
if (!self._isDisposed()) {
|
||||
error.call(self, httpStatus, errorText, context);
|
||||
}
|
||||
};
|
||||
|
||||
var getParameters = getProviderParameters("get", options.providerParameters);
|
||||
|
@ -357,8 +353,10 @@
|
|||
|
||||
var self = this;
|
||||
setTimeout(function () {
|
||||
self._implicitCommitQueued = false;
|
||||
self._implicitCommitHandler();
|
||||
if (!self._isDisposed()) {
|
||||
self._implicitCommitQueued = false;
|
||||
self._implicitCommitHandler();
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
@ -366,6 +364,10 @@
|
|||
|
||||
// Private methods
|
||||
|
||||
_isDisposed: function () {
|
||||
return this._entitySets === null;
|
||||
},
|
||||
|
||||
_trigger: function (eventType) {
|
||||
var list = this._eventCallbacks[eventType];
|
||||
if (list) {
|
||||
|
@ -379,50 +381,44 @@
|
|||
return this;
|
||||
},
|
||||
|
||||
_submitChanges: function (options, editedEntities, success, error) {
|
||||
_submitChanges: function (options, changedEntities, success, error) {
|
||||
|
||||
this._trigger("commitStart");
|
||||
|
||||
var edits = $.map(editedEntities, function (editedEntity) {
|
||||
return editedEntity.entitySet.__getEntityEdit(editedEntity.entity);
|
||||
var changes = $.map(changedEntities, function (changedEntity) {
|
||||
return changedEntity.entitySet.__getEntityChange(changedEntity.entity);
|
||||
});
|
||||
|
||||
$.each(edits, function (index, edit) { edit.updateEntityState(); });
|
||||
$.each(changes, function (index, change) { change.updateEntityState(); });
|
||||
|
||||
var self = this;
|
||||
var mapChange = function (entity, entityType, result) {
|
||||
var change = {
|
||||
Id: result.Id,
|
||||
Operation: result.Operation
|
||||
};
|
||||
if (result.Operation !== 4) { // Only add/update operations require mapped entity.
|
||||
change.Entity = self._mapEntity(result.Entity, entityType);
|
||||
var mapChangeResult = function (result, changeKind, entityType) {
|
||||
if (changeKind !== upshot.ChangeKind.Delete) { // Only add/update operations require mapped entity.
|
||||
return $.extend({}, result, {
|
||||
entity: self._mapEntity(result.entity, entityType)
|
||||
});
|
||||
}
|
||||
return change;
|
||||
return result;
|
||||
};
|
||||
|
||||
var unmapChange = function (index, entityType, operation) {
|
||||
var change = {
|
||||
Id: index.toString(),
|
||||
Operation: operation.Operation,
|
||||
Entity: operation.Entity,
|
||||
OriginalEntity: operation.OriginalEntity
|
||||
};
|
||||
if (operation.Operation !== 4) { // Delete operations don't require unmapping
|
||||
var unmap = (self._mappings[entityType] || {}).unmap || obs.unmap;
|
||||
change.Entity = unmap(operation.Entity, entityType);
|
||||
var unmapChange = function (change) {
|
||||
if (change.changeKind !== upshot.ChangeKind.Delete) { // Delete operations don't require unmapping
|
||||
var unmap = (self._mappings[change.entityType] || {}).unmap || obs.unmap;
|
||||
change.entity = unmap(change.entity, change.entityType);
|
||||
}
|
||||
return change;
|
||||
};
|
||||
|
||||
var changeSet = $.map(edits, function (edit, index) {
|
||||
return unmapChange(index, edit.entityType, edit.operation);
|
||||
$.each(changes, function (unused, change) {
|
||||
return unmapChange(change.changeSetEntry);
|
||||
});
|
||||
|
||||
var onSuccess = function (submitResult) {
|
||||
if (self._isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// all updates in the changeset where successful
|
||||
$.each(edits, function (index, edit) {
|
||||
edit.succeeded(mapChange(edit.storeEntity, edit.entityType, submitResult[index]));
|
||||
$.each(changes, function (index, change) {
|
||||
change.succeeded(mapChangeResult(submitResult[index], change.changeSetEntry.changeKind, change.changeSetEntry.entityType));
|
||||
});
|
||||
upshot.__triggerRecompute();
|
||||
self._trigger("commitSuccess", submitResult);
|
||||
|
@ -431,24 +427,28 @@
|
|||
}
|
||||
},
|
||||
onError = function (httpStatus, errorText, context, submitResult) {
|
||||
if (self._isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// one or more updates in the changeset failed
|
||||
$.each(edits, function (index, edit) {
|
||||
$.each(changes, function (index, change) {
|
||||
if (submitResult) {
|
||||
// if a submitResult was provided, we use that data in the
|
||||
// completion of the edit
|
||||
var editResult = submitResult[index];
|
||||
if (editResult.Error) {
|
||||
edit.failed(editResult.Error);
|
||||
// completion of the change
|
||||
var changeResult = submitResult[index];
|
||||
if (changeResult.error) {
|
||||
change.failed(changeResult.error);
|
||||
} else {
|
||||
// even though there were failures in the changeset,
|
||||
// this particular edit is marked as completed, so
|
||||
// this particular change is marked as completed, so
|
||||
// we need to accept changes for it
|
||||
edit.succeeded(mapChange(edit.storeEntity, edit.entityType, editResult));
|
||||
change.succeeded(mapChangeResult(change.changeSetEntry.entityType, changeResult));
|
||||
}
|
||||
} else {
|
||||
// if we don't have a submitResult, we still need to state
|
||||
// transition the edit properly
|
||||
edit.failed(null);
|
||||
// transition the change properly
|
||||
change.failed(null);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -459,21 +459,24 @@
|
|||
}
|
||||
};
|
||||
|
||||
var submitParameters = getProviderParameters("submit", options.providerParameters);
|
||||
var submitParameters = getProviderParameters("submit", options.providerParameters),
|
||||
changeSet = $.map(changes, function (change) {
|
||||
return change.changeSetEntry;
|
||||
});
|
||||
|
||||
this._dataProvider.submit(submitParameters, changeSet, onSuccess, onError);
|
||||
},
|
||||
|
||||
_commitChanges: function (options, success, error) {
|
||||
var editedEntities = [];
|
||||
var changedEntities = [];
|
||||
$.each(this._entitySets, function (type, entitySet) {
|
||||
var entities = $.map(entitySet.__getEditedEntities(), function (entity) {
|
||||
var entities = $.map(entitySet.__getChangedEntities(), function (entity) {
|
||||
return { entitySet: entitySet, entity: entity };
|
||||
});
|
||||
[ ].push.apply(editedEntities, entities);
|
||||
[ ].push.apply(changedEntities, entities);
|
||||
});
|
||||
|
||||
this._submitChanges(options, editedEntities, success, error);
|
||||
this._submitChanges(options, changedEntities, success, error);
|
||||
upshot.__triggerRecompute();
|
||||
},
|
||||
|
||||
|
|
|
@ -12,12 +12,64 @@
|
|||
entities = getResult;
|
||||
}
|
||||
|
||||
entities = upshot.isArray(entities) ? entities : [entities];
|
||||
|
||||
$.each(entities, function (unused, entity) {
|
||||
// This is not strictly model data.
|
||||
delete entity["$type"];
|
||||
});
|
||||
|
||||
return {
|
||||
entities: upshot.isArray(entities) ? entities : [entities],
|
||||
entities: entities,
|
||||
totalCount: totalCount
|
||||
};
|
||||
}
|
||||
|
||||
var operations = (function () {
|
||||
var operations = {};
|
||||
operations[upshot.ChangeKind.Add] = 1;
|
||||
operations[upshot.ChangeKind.Update] = 2;
|
||||
operations[upshot.ChangeKind.Delete] = 3;
|
||||
return operations;
|
||||
})();
|
||||
|
||||
function transformChangeSet(changeSet) {
|
||||
return $.map(changeSet, function (change, index) {
|
||||
var changeSetEntry = {
|
||||
Id: index.toString(),
|
||||
Operation: operations[change.changeKind],
|
||||
};
|
||||
$.each({ entity: "Entity", originalEntity: "OriginalEntity" }, function (key, value) {
|
||||
if (change[key]) {
|
||||
changeSetEntry[value] = $.extend(true, {}, { "$type": change.entityType }, change[key]);
|
||||
}
|
||||
});
|
||||
return changeSetEntry;
|
||||
});
|
||||
}
|
||||
|
||||
function transformSubmitResult(result) {
|
||||
return $.map(result, function (changeSetEntry) {
|
||||
var result = {};
|
||||
|
||||
if (changeSetEntry.Entity) {
|
||||
result.entity = changeSetEntry.Entity;
|
||||
}
|
||||
|
||||
// transform to Error property
|
||||
// even though upshot currently doesn't support reporting of concurrency conflicts,
|
||||
// we must still identify such failures
|
||||
$.each(["ConflictMembers", "ValidationErrors", "IsDeleteConflict"], function (index, property) {
|
||||
if (changeSetEntry.hasOwnProperty(property)) {
|
||||
result.error = result.error || {};
|
||||
result.error[property] = changeSetEntry[property];
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
var instanceMembers = {
|
||||
|
||||
// Public methods
|
||||
|
@ -76,22 +128,8 @@
|
|||
/// <param name="error" type="Function">Optional error callback</param>
|
||||
/// <returns type="Promise">A Promise representing the result of the post operation</returns>
|
||||
|
||||
$.each(changeSet, function (index, changeSetEntry) {
|
||||
switch (changeSetEntry.Operation) {
|
||||
case 2: // insert
|
||||
changeSetEntry.Operation = 1;
|
||||
break;
|
||||
case 3: // update
|
||||
changeSetEntry.Operation = 2;
|
||||
break;
|
||||
case 4: // delete
|
||||
changeSetEntry.Operation = 3;
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
var self = this,
|
||||
encodedChangeSet = JSON.stringify(changeSet);
|
||||
encodedChangeSet = JSON.stringify(transformChangeSet(changeSet));
|
||||
|
||||
$.ajax({
|
||||
url: upshot.DataProvider.normalizeUrl(parameters.url) + "Submit",
|
||||
|
@ -99,23 +137,11 @@
|
|||
data: encodedChangeSet,
|
||||
dataType: "json",
|
||||
type: "POST",
|
||||
success: (success || error) && function (data, statusText, jqXHR) {
|
||||
var result = data;
|
||||
var hasErrors = false;
|
||||
if (result) {
|
||||
// transform to Error property
|
||||
$.each(result, function (index, changeSetEntry) {
|
||||
// even though upshot currently doesn't support reporting of concurrency conflicts,
|
||||
// we must still identify such failures
|
||||
$.each(["ConflictMembers", "ValidationErrors", "IsDeleteConflict"], function (index, property) {
|
||||
if (changeSetEntry.hasOwnProperty(property)) {
|
||||
changeSetEntry.Error = changeSetEntry.Error || {};
|
||||
changeSetEntry.Error[property] = changeSetEntry[property];
|
||||
hasErrors = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
success: (success || error) && function (submitChangesResult, statusText, jqXHR) {
|
||||
var result = submitChangesResult ? transformSubmitResult(submitChangesResult) : [];
|
||||
var hasErrors = $.grep(result, function (subresult) {
|
||||
return subresult.hasOwnProperty("error");
|
||||
}).length > 0;
|
||||
|
||||
if (!hasErrors) {
|
||||
if (success) {
|
||||
|
@ -123,9 +149,10 @@
|
|||
}
|
||||
} else if (error) {
|
||||
var errorText = "Submit failed.";
|
||||
if (result) {
|
||||
for (var i = 0; i < result.length; ++i) {
|
||||
var validationError = (result[i].ValidationErrors && result[i].ValidationErrors[0] && result[i].ValidationErrors[0].Message);
|
||||
if (submitChangesResult) {
|
||||
for (var i = 0; i < submitChangesResult.length; ++i) {
|
||||
// TODO: Why does this only treat ValidationErrors? What about ConflictMembers and IsDeleteConflict?
|
||||
var validationError = (submitChangesResult[i].ValidationErrors && submitChangesResult[i].ValidationErrors[0] && submitChangesResult[i].ValidationErrors[0].Message);
|
||||
if (validationError) {
|
||||
errorText = validationError;
|
||||
break;
|
||||
|
|
|
@ -109,6 +109,11 @@
|
|||
};
|
||||
});
|
||||
|
||||
$.each(result.RootResults, function (unused, entity) {
|
||||
// This is not strictly model data.
|
||||
delete entity.__type;
|
||||
});
|
||||
|
||||
var includedEntities;
|
||||
if (result.IncludedResults) {
|
||||
// group included entities by type
|
||||
|
@ -129,6 +134,51 @@
|
|||
};
|
||||
}
|
||||
|
||||
var operations = (function () {
|
||||
var operations = {};
|
||||
operations[upshot.ChangeKind.Add] = 2;
|
||||
operations[upshot.ChangeKind.Update] = 3;
|
||||
operations[upshot.ChangeKind.Delete] = 4;
|
||||
return operations;
|
||||
})();
|
||||
|
||||
function transformChangeSet(changeSet) {
|
||||
return $.map(changeSet, function (change, index) {
|
||||
var changeSetEntry = {
|
||||
Id: index.toString(),
|
||||
Operation: operations[change.changeKind],
|
||||
};
|
||||
$.each({ entity: "Entity", originalEntity: "OriginalEntity" }, function (key, value) {
|
||||
if (change[key]) {
|
||||
changeSetEntry[value] = $.extend(true, {}, { __type: change.entityType }, change[key]);
|
||||
}
|
||||
});
|
||||
return changeSetEntry;
|
||||
});
|
||||
}
|
||||
|
||||
function transformSubmitResult(result) {
|
||||
return $.map(result, function (changeSetEntry) {
|
||||
var result = {};
|
||||
|
||||
if (changeSetEntry.Entity) {
|
||||
result.entity = changeSetEntry.Entity;
|
||||
}
|
||||
|
||||
// transform to Error property
|
||||
// even though upshot currently doesn't support reporting of concurrency conflicts,
|
||||
// we must still identify such failures
|
||||
$.each(["ConflictMembers", "ValidationErrors", "IsDeleteConflict"], function (index, property) {
|
||||
if (changeSetEntry.hasOwnProperty(property)) {
|
||||
result.error = result.error || {};
|
||||
result.error[property] = changeSetEntry[property];
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
var instanceMembers = {
|
||||
|
||||
// Public methods
|
||||
|
@ -182,7 +232,7 @@
|
|||
/// <returns type="Promise">A Promise representing the result of the post operation</returns>
|
||||
|
||||
var self = this,
|
||||
encodedChangeSet = JSON.stringify({ changeSet: changeSet });
|
||||
encodedChangeSet = JSON.stringify({ changeSet: transformChangeSet(changeSet) });
|
||||
|
||||
$.ajax({
|
||||
url: upshot.DataProvider.normalizeUrl(parameters.url) + "json/SubmitChanges",
|
||||
|
@ -191,22 +241,11 @@
|
|||
dataType: "json",
|
||||
type: "POST",
|
||||
success: (success || error) && function (data, statusText, jqXHR) {
|
||||
var result = data["SubmitChangesResult"];
|
||||
var hasErrors = false;
|
||||
if (result) {
|
||||
// transform to Error property
|
||||
$.each(result, function (index, changeSetEntry) {
|
||||
// even though upshot currently doesn't support reporting of concurrency conflicts,
|
||||
// we must still identify such failures
|
||||
$.each(["ConflictMembers", "ValidationErrors", "IsDeleteConflict"], function (index, property) {
|
||||
if (changeSetEntry.hasOwnProperty(property)) {
|
||||
changeSetEntry.Error = changeSetEntry.Error || {};
|
||||
changeSetEntry.Error[property] = changeSetEntry[property];
|
||||
hasErrors = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
var submitChangesResult = data.SubmitChangesResult,
|
||||
result = submitChangesResult ? transformSubmitResult(submitChangesResult) : [],
|
||||
hasErrors = $.grep(result, function (subresult) {
|
||||
return subresult.hasOwnProperty("error");
|
||||
}).length > 0;
|
||||
|
||||
if (!hasErrors) {
|
||||
if (success) {
|
||||
|
@ -214,9 +253,10 @@
|
|||
}
|
||||
} else if (error) {
|
||||
var errorText = "Submit failed.";
|
||||
if (result) {
|
||||
for (var i = 0; i < result.length; ++i) {
|
||||
var validationError = (result[i].ValidationErrors && result[i].ValidationErrors[0] && result[i].ValidationErrors[0].Message);
|
||||
if (submitChangesResult) {
|
||||
for (var i = 0; i < submitChangesResult.length; ++i) {
|
||||
// TODO: Why does this only treat ValidationErrors? What about ConflictMembers and IsDeleteConflict?
|
||||
var validationError = (submitChangesResult[i].ValidationErrors && submitChangesResult[i].ValidationErrors[0] && submitChangesResult[i].ValidationErrors[0].Message);
|
||||
if (validationError) {
|
||||
errorText = validationError;
|
||||
break;
|
||||
|
|
|
@ -283,8 +283,8 @@
|
|||
// Deleting a entity that is uncommitted and only on the client.
|
||||
this._purgeUncommittedAddedEntity(this._getAddedEntityFromId(id));
|
||||
} else if (upshot.EntityState.isServerSyncing(entityState)) {
|
||||
// Force the application to block deletes while saving any edit to this same entity.
|
||||
// We don't have a mechanism to enqueue this edit, then apply when the commit succeeds,
|
||||
// Force the application to block deletes while saving any change to this same entity.
|
||||
// We don't have a mechanism to enqueue this change, then apply when the commit succeeds,
|
||||
// possibly discard it when the commit fails.
|
||||
throw "Can't delete an entity while previous changes are being committed.";
|
||||
} else {
|
||||
|
@ -340,7 +340,7 @@
|
|||
return mergedLoadedEntities;
|
||||
},
|
||||
|
||||
__getEditedEntities: function () {
|
||||
__getChangedEntities: function () {
|
||||
var self = this,
|
||||
entities = [];
|
||||
$.each(this._entityStates, function (id, state) {
|
||||
|
@ -352,38 +352,37 @@
|
|||
return entities;
|
||||
},
|
||||
|
||||
__getEntityEdit: function (entity) {
|
||||
__getEntityChange: function (entity) {
|
||||
var id = this.getEntityId(entity),
|
||||
self = this,
|
||||
submittingState,
|
||||
operation,
|
||||
addEntityType = function (entityToExtend) {
|
||||
return $.extend({ "__type": self._entityType }, entityToExtend);
|
||||
};
|
||||
change,
|
||||
changeKind,
|
||||
lastError = this.getEntityError(entity);
|
||||
|
||||
switch (this._entityStates[id]) {
|
||||
case upshot.EntityState.ClientUpdated:
|
||||
submittingState = upshot.EntityState.ServerUpdating;
|
||||
operation = {
|
||||
Operation: 3,
|
||||
Entity: addEntityType(this._getSerializableEntity(entity)),
|
||||
OriginalEntity: addEntityType(this._getOriginalValue(entity, this._entityType))
|
||||
changeKind = upshot.ChangeKind.Update;
|
||||
change = {
|
||||
entity: this._getSerializableEntity(entity),
|
||||
originalEntity: this._getOriginalValue(entity, this._entityType)
|
||||
};
|
||||
break;
|
||||
|
||||
case upshot.EntityState.ClientAdded:
|
||||
submittingState = upshot.EntityState.ServerAdding;
|
||||
entity = this._getAddedEntityFromId(id).entity;
|
||||
operation = {
|
||||
Operation: 2,
|
||||
Entity: addEntityType(this._getSerializableEntity(entity))
|
||||
changeKind = upshot.ChangeKind.Add;
|
||||
change = {
|
||||
entity: this._getSerializableEntity(entity)
|
||||
};
|
||||
break;
|
||||
|
||||
case upshot.EntityState.ClientDeleted:
|
||||
submittingState = upshot.EntityState.ServerDeleting;
|
||||
operation = {
|
||||
Operation: 4,
|
||||
Entity: addEntityType(this._getOriginalValue(entity, this._entityType))
|
||||
changeKind = upshot.ChangeKind.Delete;
|
||||
change = {
|
||||
entity: this._getOriginalValue(entity, this._entityType)
|
||||
};
|
||||
// TODO -- Do we allow for concurrency guards here?
|
||||
break;
|
||||
|
@ -392,11 +391,11 @@
|
|||
throw "Unrecognized entity state.";
|
||||
}
|
||||
|
||||
var lastError = self.getEntityError(entity);
|
||||
var edit = {
|
||||
entityType: this._entityType,
|
||||
storeEntity: entity,
|
||||
operation: operation,
|
||||
return {
|
||||
changeSetEntry: $.extend(change, {
|
||||
entityType: this._entityType,
|
||||
changeKind: changeKind
|
||||
}),
|
||||
updateEntityState: function () {
|
||||
self._updateEntityState(id, submittingState, lastError);
|
||||
|
||||
|
@ -405,13 +404,12 @@
|
|||
///#ENDDEBUG
|
||||
},
|
||||
succeeded: function (result) {
|
||||
self._handleSubmitSucceeded(id, operation, result);
|
||||
self._handleSubmitSucceeded(id, changeKind, result);
|
||||
},
|
||||
failed: function (error) {
|
||||
self._handleSubmitFailed(id, operation, error || lastError);
|
||||
self._handleSubmitFailed(id, changeKind, error || lastError);
|
||||
}
|
||||
};
|
||||
return edit;
|
||||
},
|
||||
|
||||
__revertChanges: function () {
|
||||
|
@ -520,12 +518,12 @@
|
|||
throw "Entity not cached in data context.";
|
||||
} else if (entityState === upshot.EntityState.ClientAdded) {
|
||||
// Updating a entity that is uncommitted and only on the client.
|
||||
// Edit state remains "ClientAdded". We won't event an edit state change (so clients had
|
||||
// Entity state remains "ClientAdded". We won't event an entity state change (so clients had
|
||||
// better be listening on "change").
|
||||
// Fall through and do implicit commit.
|
||||
} else if (upshot.EntityState.isServerSyncing(entityState)) {
|
||||
// Force the application to block updates while saving any edit to this same entity.
|
||||
// We don't have a mechanism to enqueue this edit, then apply when the commit succeeds,
|
||||
// Force the application to block updates while saving any change to this same entity.
|
||||
// We don't have a mechanism to enqueue this change, then apply when the commit succeeds,
|
||||
// possibly discard it when the commit fails.
|
||||
throw "Can't update an entity while previous changes are being committed.";
|
||||
} else {
|
||||
|
@ -1204,7 +1202,7 @@
|
|||
},
|
||||
|
||||
_arrayRemove: function (array, type, index, numToRemove) {
|
||||
this._removeTracking(array.slice(index, numToRemove));
|
||||
this._removeTracking(array.slice(index, index + numToRemove));
|
||||
obs.remove(array, index, numToRemove);
|
||||
},
|
||||
|
||||
|
@ -1236,20 +1234,20 @@
|
|||
return addedEntities[0];
|
||||
},
|
||||
|
||||
_handleSubmitSucceeded: function (id, operation, result) {
|
||||
_handleSubmitSucceeded: function (id, changeKind, result) {
|
||||
var entity = this._getEntityFromId(id); // ...before we purge.
|
||||
|
||||
switch (operation.Operation) {
|
||||
case 2:
|
||||
switch (changeKind) {
|
||||
case upshot.ChangeKind.Add:
|
||||
// Do this before the model change, so listeners on data change events see consistent entity state.
|
||||
this._updateEntityState(id, upshot.EntityState.Unmodified);
|
||||
|
||||
// Keep entity in addedEntities to maintain its synthetic id as the client-known id.
|
||||
this._getAddedEntityFromId(id).committed = true;
|
||||
|
||||
this._serverEntities.push({ entity: entity, identity: this._getEntityIdentity(result.Entity) });
|
||||
this._serverEntities.push({ entity: entity, identity: this._getEntityIdentity(result.entity) });
|
||||
this._clearChanges(entity, false);
|
||||
this._merge(entity, result.Entity);
|
||||
this._merge(entity, result.entity);
|
||||
|
||||
///#DEBUG
|
||||
this._verifyConsistency(entity, id, false, true);
|
||||
|
@ -1257,12 +1255,12 @@
|
|||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case upshot.ChangeKind.Update:
|
||||
// Do this before the model change, so listeners on data change events see consistent entity state.
|
||||
this._updateEntityState(id, upshot.EntityState.Unmodified);
|
||||
|
||||
this._clearChanges(entity, false);
|
||||
this._merge(entity, result.Entity);
|
||||
this._merge(entity, result.entity);
|
||||
this._triggerEntityUpdated(entity);
|
||||
|
||||
///#DEBUG
|
||||
|
@ -1271,7 +1269,7 @@
|
|||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case upshot.ChangeKind.Delete:
|
||||
this._purgeServerEntity(entity, id); // This updates entity state to Deleted, verifies consistency.
|
||||
break;
|
||||
}
|
||||
|
@ -1281,14 +1279,14 @@
|
|||
///#ENDDEBUG
|
||||
},
|
||||
|
||||
_handleSubmitFailed: function (id, operation, error) {
|
||||
_handleSubmitFailed: function (id, changeKind, error) {
|
||||
var entity = this._getEntityFromId(id);
|
||||
|
||||
var state;
|
||||
switch (operation.Operation) {
|
||||
case 2: state = upshot.EntityState.ClientAdded; break;
|
||||
case 3: state = upshot.EntityState.ClientUpdated; break;
|
||||
case 4: state = upshot.EntityState.ClientDeleted; break;
|
||||
switch (changeKind) {
|
||||
case upshot.ChangeKind.Add: state = upshot.EntityState.ClientAdded; break;
|
||||
case upshot.ChangeKind.Update: state = upshot.EntityState.ClientUpdated; break;
|
||||
case upshot.ChangeKind.Delete: state = upshot.EntityState.ClientDeleted; break;
|
||||
}
|
||||
|
||||
this._updateEntityState(id, state, error);
|
||||
|
|
|
@ -168,6 +168,10 @@
|
|||
// Will be overridden by derived classes.
|
||||
},
|
||||
|
||||
_isDisposed: function () {
|
||||
return this._eventCallbacks === null;
|
||||
},
|
||||
|
||||
_handleArrayChange: function (type, eventArguments) {
|
||||
switch (type) {
|
||||
case "insert":
|
||||
|
|
|
@ -190,11 +190,15 @@
|
|||
|
||||
var self = this,
|
||||
onSuccess = function (entitySet, entities, totalCount) {
|
||||
self._bindToEntitySource(entitySet);
|
||||
self._completeRefresh(entities, totalCount, success);
|
||||
if (!self._isDisposed()) {
|
||||
self._bindToEntitySource(entitySet);
|
||||
self._completeRefresh(entities, totalCount, success);
|
||||
}
|
||||
},
|
||||
onError = function (httpStatus, errorText, context) {
|
||||
self._failRefresh(httpStatus, errorText, context, error);
|
||||
if (!self._isDisposed()) {
|
||||
self._failRefresh(httpStatus, errorText, context, error);
|
||||
}
|
||||
};
|
||||
|
||||
this._dataContext.__load({
|
||||
|
|
|
@ -275,9 +275,6 @@
|
|||
return array;
|
||||
} else if (upshot.isObject(item)) {
|
||||
var obj = {};
|
||||
if (item.hasOwnProperty("__type")) { // make sure __type flows through first
|
||||
obj["__type"] = ko.utils.unwrapObservable(item["__type"]);
|
||||
}
|
||||
ko.utils.arrayForEach(upshot.metadata.getProperties(item, entityType), function (prop) {
|
||||
// TODO: determine if there are scenarios where we want to support hasOwnProperty returning false
|
||||
if (item.hasOwnProperty(prop.name)) {
|
||||
|
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{F6C0671C-B832-4807-BA9A-9206BD35A650}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.Web.Http.Data.Helpers.Test</RootNamespace>
|
||||
<AssemblyName>Microsoft.Web.Http.Data.Helpers.Test</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>$(WebStackRootPath)\bin\Debug\Test\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>$(WebStackRootPath)\bin\Release\Test\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'CodeCoverage' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>$(WebStackRootPath)\bin\CodeCoverage\Test\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EntityFramework">
|
||||
<HintPath>..\..\packages\EntityFramework.5.0.0-beta2\lib\net40\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq">
|
||||
<HintPath>..\..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Newtonsoft.Json.4.5.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Entity" />
|
||||
<Reference Include="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Net.Http.2.0.20326.1\lib\net40\System.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.Net.Http.2.0.20326.1\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="xunit">
|
||||
<HintPath>..\..\packages\xunit.1.9.0.1566\lib\xunit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xunit.extensions">
|
||||
<HintPath>..\..\packages\xunit.extensions.1.9.0.1566\lib\xunit.extensions.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
|
||||
<Visible>False</Visible>
|
||||
</CodeAnalysisDependentAssemblyPaths>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Microsoft.Web.Http.Data.Test\Controllers\CatalogController.cs">
|
||||
<Link>Controllers\CatalogController.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Microsoft.Web.Http.Data.Test\Controllers\CitiesController.cs">
|
||||
<Link>Controllers\CitiesController.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Microsoft.Web.Http.Data.Test\Controllers\NorthwindEFController.cs">
|
||||
<Link>Controllers\NorthwindEFController.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Microsoft.Web.Http.Data.Test\Models\CatalogEntities.cs">
|
||||
<Link>Models\CatalogEntities.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Microsoft.Web.Http.Data.Test\Models\Cities.cs">
|
||||
<Link>Models\Cities.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Microsoft.Web.Http.Data.Test\TestHelpers.cs">
|
||||
<Link>TestHelpers.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="UpshotExtensionsTests.cs" />
|
||||
<Compile Include="Models\Northwind.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Northwind.edmx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\System.Json\System.Json.csproj">
|
||||
<Project>{F0441BE9-BDC0-4629-BE5A-8765FFAA2481}</Project>
|
||||
<Name>System.Json</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\System.Net.Http.Formatting\System.Net.Http.Formatting.csproj">
|
||||
<Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
|
||||
<Name>System.Net.Http.Formatting</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Http.Data.Helpers\Microsoft.Web.Http.Data.Helpers.csproj">
|
||||
<Project>{B6895A1B-382F-4A69-99EC-E965E19B0AB3}</Project>
|
||||
<Name>Microsoft.Web.Http.Data.Helpers</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\System.Web.Http\System.Web.Http.csproj">
|
||||
<Project>{DDC1CE0C-486E-4E35-BB3B-EAB61F8F9440}</Project>
|
||||
<Name>System.Web.Http</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Http.Data.EntityFramework\Microsoft.Web.Http.Data.EntityFramework.csproj">
|
||||
<Project>{653F3946-541C-42D3-BBC1-CE89B392BDA9}</Project>
|
||||
<Name>Microsoft.Web.Http.Data.EntityFramework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Http.Data\Microsoft.Web.Http.Data.csproj">
|
||||
<Project>{ACE91549-D86E-4EB6-8C2A-5FF51386BB68}</Project>
|
||||
<Name>Microsoft.Web.Http.Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Http.Data.Helpers\Microsoft.Web.Http.Data.Helpers.csproj">
|
||||
<Project>{B6895A1B-382F-4A69-99EC-E965E19B0AB3}</Project>
|
||||
<Name>Microsoft.Web.Http.Data.Helpers</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\System.Web.Mvc\System.Web.Mvc.csproj">
|
||||
<Project>{3D3FFD8A-624D-4E9B-954B-E1C105507975}</Project>
|
||||
<Name>System.Web.Mvc</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Microsoft.TestCommon\Microsoft.TestCommon.csproj">
|
||||
<Project>{FCCC4CB7-BAF7-4A57-9F89-E5766FE536C0}</Project>
|
||||
<Name>Microsoft.TestCommon</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\System.Web.Mvc.Test\System.Web.Mvc.Test.csproj">
|
||||
<Project>{8AC2A2E4-2F11-4D40-A887-62E2583A65E6}</Project>
|
||||
<Name>System.Web.Mvc.Test</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EntityDeploy Include="Models\Northwind.edmx">
|
||||
<Generator>EntityModelCodeGenerator</Generator>
|
||||
<LastGenOutput>Northwind.Designer.cs</LastGenOutput>
|
||||
<CustomToolNamespace>System.Web.Http.Data.Test.Models.EF</CustomToolNamespace>
|
||||
</EntityDeploy>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,933 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
|
||||
<!-- EF Runtime content -->
|
||||
<edmx:Runtime>
|
||||
<!-- SSDL content -->
|
||||
<edmx:StorageModels>
|
||||
<Schema Namespace="northwindModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
|
||||
<EntityContainer Name="northwindModelStoreContainer">
|
||||
<EntitySet Name="Categories" EntityType="northwindModel.Store.Categories" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="CustomerCustomerDemo" EntityType="northwindModel.Store.CustomerCustomerDemo" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="CustomerDemographics" EntityType="northwindModel.Store.CustomerDemographics" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Customers" EntityType="northwindModel.Store.Customers" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Employees" EntityType="northwindModel.Store.Employees" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="EmployeeTerritories" EntityType="northwindModel.Store.EmployeeTerritories" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Order Details" EntityType="northwindModel.Store.Order Details" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Orders" EntityType="northwindModel.Store.Orders" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Products" EntityType="northwindModel.Store.Products" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Region" EntityType="northwindModel.Store.Region" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Shippers" EntityType="northwindModel.Store.Shippers" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Suppliers" EntityType="northwindModel.Store.Suppliers" store:Type="Tables" Schema="dbo" />
|
||||
<EntitySet Name="Territories" EntityType="northwindModel.Store.Territories" store:Type="Tables" Schema="dbo" />
|
||||
<AssociationSet Name="FK_CustomerCustomerDemo" Association="northwindModel.Store.FK_CustomerCustomerDemo">
|
||||
<End Role="CustomerDemographics" EntitySet="CustomerDemographics" />
|
||||
<End Role="CustomerCustomerDemo" EntitySet="CustomerCustomerDemo" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_CustomerCustomerDemo_Customers" Association="northwindModel.Store.FK_CustomerCustomerDemo_Customers">
|
||||
<End Role="Customers" EntitySet="Customers" />
|
||||
<End Role="CustomerCustomerDemo" EntitySet="CustomerCustomerDemo" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Employees_Employees" Association="northwindModel.Store.FK_Employees_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Employees1" EntitySet="Employees" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_EmployeeTerritories_Employees" Association="northwindModel.Store.FK_EmployeeTerritories_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="EmployeeTerritories" EntitySet="EmployeeTerritories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_EmployeeTerritories_Territories" Association="northwindModel.Store.FK_EmployeeTerritories_Territories">
|
||||
<End Role="Territories" EntitySet="Territories" />
|
||||
<End Role="EmployeeTerritories" EntitySet="EmployeeTerritories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Order_Details_Orders" Association="northwindModel.Store.FK_Order_Details_Orders">
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
<End Role="Order Details" EntitySet="Order Details" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Order_Details_Products" Association="northwindModel.Store.FK_Order_Details_Products">
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
<End Role="Order Details" EntitySet="Order Details" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Customers" Association="northwindModel.Store.FK_Orders_Customers">
|
||||
<End Role="Customers" EntitySet="Customers" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Employees" Association="northwindModel.Store.FK_Orders_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Shippers" Association="northwindModel.Store.FK_Orders_Shippers">
|
||||
<End Role="Shippers" EntitySet="Shippers" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Products_Categories" Association="northwindModel.Store.FK_Products_Categories">
|
||||
<End Role="Categories" EntitySet="Categories" />
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Products_Suppliers" Association="northwindModel.Store.FK_Products_Suppliers">
|
||||
<End Role="Suppliers" EntitySet="Suppliers" />
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Territories_Region" Association="northwindModel.Store.FK_Territories_Region">
|
||||
<End Role="Region" EntitySet="Region" />
|
||||
<End Role="Territories" EntitySet="Territories" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<EntityType Name="Categories">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
|
||||
<Property Name="CategoryName" Type="nvarchar" Nullable="false" MaxLength="15" />
|
||||
<Property Name="Description" Type="ntext" />
|
||||
<Property Name="Picture" Type="image" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerCustomerDemo">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="nchar" Nullable="false" MaxLength="5" />
|
||||
<Property Name="CustomerTypeID" Type="nchar" Nullable="false" MaxLength="10" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerDemographics">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerTypeID" Type="nchar" Nullable="false" MaxLength="10" />
|
||||
<Property Name="CustomerDesc" Type="ntext" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customers">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="nchar" Nullable="false" MaxLength="5" />
|
||||
<Property Name="CompanyName" Type="nvarchar" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="nvarchar" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="nvarchar" MaxLength="30" />
|
||||
<Property Name="Address" Type="nvarchar" MaxLength="60" />
|
||||
<Property Name="City" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="Region" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="nvarchar" MaxLength="10" />
|
||||
<Property Name="Country" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="Phone" Type="nvarchar" MaxLength="24" />
|
||||
<Property Name="Fax" Type="nvarchar" MaxLength="24" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employees">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
|
||||
<Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="20" />
|
||||
<Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="10" />
|
||||
<Property Name="Title" Type="nvarchar" MaxLength="30" />
|
||||
<Property Name="TitleOfCourtesy" Type="nvarchar" MaxLength="25" />
|
||||
<Property Name="BirthDate" Type="datetime" />
|
||||
<Property Name="HireDate" Type="datetime" />
|
||||
<Property Name="Address" Type="nvarchar" MaxLength="60" />
|
||||
<Property Name="City" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="Region" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="nvarchar" MaxLength="10" />
|
||||
<Property Name="Country" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="HomePhone" Type="nvarchar" MaxLength="24" />
|
||||
<Property Name="Extension" Type="nvarchar" MaxLength="4" />
|
||||
<Property Name="Photo" Type="image" />
|
||||
<Property Name="Notes" Type="ntext" />
|
||||
<Property Name="ReportsTo" Type="int" />
|
||||
<Property Name="PhotoPath" Type="nvarchar" MaxLength="255" />
|
||||
</EntityType>
|
||||
<EntityType Name="EmployeeTerritories">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="int" Nullable="false" />
|
||||
<Property Name="TerritoryID" Type="nvarchar" Nullable="false" MaxLength="20" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order Details">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="int" Nullable="false" />
|
||||
<Property Name="ProductID" Type="int" Nullable="false" />
|
||||
<Property Name="UnitPrice" Type="money" Nullable="false" />
|
||||
<Property Name="Quantity" Type="smallint" Nullable="false" />
|
||||
<Property Name="Discount" Type="real" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Orders">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
|
||||
<Property Name="CustomerID" Type="nchar" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="int" />
|
||||
<Property Name="OrderDate" Type="datetime" />
|
||||
<Property Name="RequiredDate" Type="datetime" />
|
||||
<Property Name="ShippedDate" Type="datetime" />
|
||||
<Property Name="ShipVia" Type="int" />
|
||||
<Property Name="Freight" Type="money" />
|
||||
<Property Name="ShipName" Type="nvarchar" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="nvarchar" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="nvarchar" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="nvarchar" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
|
||||
<Property Name="ProductName" Type="nvarchar" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="int" />
|
||||
<Property Name="CategoryID" Type="int" />
|
||||
<Property Name="QuantityPerUnit" Type="nvarchar" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="money" />
|
||||
<Property Name="UnitsInStock" Type="smallint" />
|
||||
<Property Name="UnitsOnOrder" Type="smallint" />
|
||||
<Property Name="ReorderLevel" Type="smallint" />
|
||||
<Property Name="Discontinued" Type="bit" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Region">
|
||||
<Key>
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Key>
|
||||
<Property Name="RegionID" Type="int" Nullable="false" />
|
||||
<Property Name="RegionDescription" Type="nchar" Nullable="false" MaxLength="50" />
|
||||
</EntityType>
|
||||
<EntityType Name="Shippers">
|
||||
<Key>
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Key>
|
||||
<Property Name="ShipperID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
|
||||
<Property Name="CompanyName" Type="nvarchar" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Phone" Type="nvarchar" MaxLength="24" />
|
||||
</EntityType>
|
||||
<EntityType Name="Suppliers">
|
||||
<Key>
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Key>
|
||||
<Property Name="SupplierID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
|
||||
<Property Name="CompanyName" Type="nvarchar" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="nvarchar" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="nvarchar" MaxLength="30" />
|
||||
<Property Name="Address" Type="nvarchar" MaxLength="60" />
|
||||
<Property Name="City" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="Region" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="nvarchar" MaxLength="10" />
|
||||
<Property Name="Country" Type="nvarchar" MaxLength="15" />
|
||||
<Property Name="Phone" Type="nvarchar" MaxLength="24" />
|
||||
<Property Name="Fax" Type="nvarchar" MaxLength="24" />
|
||||
<Property Name="HomePage" Type="ntext" />
|
||||
</EntityType>
|
||||
<EntityType Name="Territories">
|
||||
<Key>
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="TerritoryID" Type="nvarchar" Nullable="false" MaxLength="20" />
|
||||
<Property Name="TerritoryDescription" Type="nchar" Nullable="false" MaxLength="50" />
|
||||
<Property Name="RegionID" Type="int" Nullable="false" />
|
||||
</EntityType>
|
||||
<Association Name="FK_CustomerCustomerDemo">
|
||||
<End Role="CustomerDemographics" Type="northwindModel.Store.CustomerDemographics" Multiplicity="1" />
|
||||
<End Role="CustomerCustomerDemo" Type="northwindModel.Store.CustomerCustomerDemo" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="CustomerDemographics">
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Principal>
|
||||
<Dependent Role="CustomerCustomerDemo">
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_CustomerCustomerDemo_Customers">
|
||||
<End Role="Customers" Type="northwindModel.Store.Customers" Multiplicity="1" />
|
||||
<End Role="CustomerCustomerDemo" Type="northwindModel.Store.CustomerCustomerDemo" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Customers">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Principal>
|
||||
<Dependent Role="CustomerCustomerDemo">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Employees_Employees">
|
||||
<End Role="Employees" Type="northwindModel.Store.Employees" Multiplicity="0..1" />
|
||||
<End Role="Employees1" Type="northwindModel.Store.Employees" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="Employees1">
|
||||
<PropertyRef Name="ReportsTo" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_EmployeeTerritories_Employees">
|
||||
<End Role="Employees" Type="northwindModel.Store.Employees" Multiplicity="1" />
|
||||
<End Role="EmployeeTerritories" Type="northwindModel.Store.EmployeeTerritories" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="EmployeeTerritories">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_EmployeeTerritories_Territories">
|
||||
<End Role="Territories" Type="northwindModel.Store.Territories" Multiplicity="1" />
|
||||
<End Role="EmployeeTerritories" Type="northwindModel.Store.EmployeeTerritories" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Territories">
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Principal>
|
||||
<Dependent Role="EmployeeTerritories">
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Order_Details_Orders">
|
||||
<End Role="Orders" Type="northwindModel.Store.Orders" Multiplicity="1" />
|
||||
<End Role="Order Details" Type="northwindModel.Store.Order Details" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Orders">
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Principal>
|
||||
<Dependent Role="Order Details">
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Order_Details_Products">
|
||||
<End Role="Products" Type="northwindModel.Store.Products" Multiplicity="1" />
|
||||
<End Role="Order Details" Type="northwindModel.Store.Order Details" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Products">
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Principal>
|
||||
<Dependent Role="Order Details">
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Customers">
|
||||
<End Role="Customers" Type="northwindModel.Store.Customers" Multiplicity="0..1" />
|
||||
<End Role="Orders" Type="northwindModel.Store.Orders" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Customers">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Employees">
|
||||
<End Role="Employees" Type="northwindModel.Store.Employees" Multiplicity="0..1" />
|
||||
<End Role="Orders" Type="northwindModel.Store.Orders" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Shippers">
|
||||
<End Role="Shippers" Type="northwindModel.Store.Shippers" Multiplicity="0..1" />
|
||||
<End Role="Orders" Type="northwindModel.Store.Orders" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Shippers">
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="ShipVia" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Products_Categories">
|
||||
<End Role="Categories" Type="northwindModel.Store.Categories" Multiplicity="0..1" />
|
||||
<End Role="Products" Type="northwindModel.Store.Products" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Categories">
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Principal>
|
||||
<Dependent Role="Products">
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Products_Suppliers">
|
||||
<End Role="Suppliers" Type="northwindModel.Store.Suppliers" Multiplicity="0..1" />
|
||||
<End Role="Products" Type="northwindModel.Store.Products" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Suppliers">
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Principal>
|
||||
<Dependent Role="Products">
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Territories_Region">
|
||||
<End Role="Region" Type="northwindModel.Store.Region" Multiplicity="1" />
|
||||
<End Role="Territories" Type="northwindModel.Store.Territories" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Region">
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Principal>
|
||||
<Dependent Role="Territories">
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
</Schema>
|
||||
</edmx:StorageModels>
|
||||
<!-- CSDL content -->
|
||||
<edmx:ConceptualModels>
|
||||
<Schema Namespace="northwindModel" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
|
||||
<EntityContainer Name="NorthwindEntities" annotation:LazyLoadingEnabled="true">
|
||||
<EntitySet Name="Categories" EntityType="northwindModel.Category" />
|
||||
<EntitySet Name="CustomerDemographics" EntityType="northwindModel.CustomerDemographic" />
|
||||
<EntitySet Name="Customers" EntityType="northwindModel.Customer" />
|
||||
<EntitySet Name="Employees" EntityType="northwindModel.Employee" />
|
||||
<EntitySet Name="Order_Details" EntityType="northwindModel.Order_Detail" />
|
||||
<EntitySet Name="Orders" EntityType="northwindModel.Order" />
|
||||
<EntitySet Name="Products" EntityType="northwindModel.Product" />
|
||||
<EntitySet Name="Regions" EntityType="northwindModel.Region" />
|
||||
<EntitySet Name="Shippers" EntityType="northwindModel.Shipper" />
|
||||
<EntitySet Name="Suppliers" EntityType="northwindModel.Supplier" />
|
||||
<EntitySet Name="Territories" EntityType="northwindModel.Territory" />
|
||||
<AssociationSet Name="FK_Products_Categories" Association="northwindModel.FK_Products_Categories">
|
||||
<End Role="Categories" EntitySet="Categories" />
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Customers" Association="northwindModel.FK_Orders_Customers">
|
||||
<End Role="Customers" EntitySet="Customers" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Employees_Employees" Association="northwindModel.FK_Employees_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Employees1" EntitySet="Employees" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Employees" Association="northwindModel.FK_Orders_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Order_Details_Orders" Association="northwindModel.FK_Order_Details_Orders">
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
<End Role="Order_Details" EntitySet="Order_Details" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Order_Details_Products" Association="northwindModel.FK_Order_Details_Products">
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
<End Role="Order_Details" EntitySet="Order_Details" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Shippers" Association="northwindModel.FK_Orders_Shippers">
|
||||
<End Role="Shippers" EntitySet="Shippers" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Products_Suppliers" Association="northwindModel.FK_Products_Suppliers">
|
||||
<End Role="Suppliers" EntitySet="Suppliers" />
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Territories_Region" Association="northwindModel.FK_Territories_Region">
|
||||
<End Role="Region" EntitySet="Regions" />
|
||||
<End Role="Territories" EntitySet="Territories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="CustomerCustomerDemo" Association="northwindModel.CustomerCustomerDemo">
|
||||
<End Role="CustomerDemographics" EntitySet="CustomerDemographics" />
|
||||
<End Role="Customers" EntitySet="Customers" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="EmployeeTerritories" Association="northwindModel.EmployeeTerritories">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Territories" EntitySet="Territories" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" ConcurrencyMode="Fixed" />
|
||||
<Property Name="CategoryName" Type="String" Nullable="false" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="None" />
|
||||
<Property Name="Description" Type="String" MaxLength="Max" Unicode="true" FixedLength="false" ConcurrencyMode="None" />
|
||||
<Property Name="Picture" Type="Binary" MaxLength="Max" FixedLength="false" />
|
||||
<NavigationProperty Name="Products" Relationship="northwindModel.FK_Products_Categories" FromRole="Categories" ToRole="Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerDemographic">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerTypeID" Type="String" Nullable="false" MaxLength="10" Unicode="true" FixedLength="true" />
|
||||
<Property Name="CustomerDesc" Type="String" MaxLength="Max" Unicode="true" FixedLength="false" />
|
||||
<NavigationProperty Name="Customers" Relationship="northwindModel.CustomerCustomerDemo" FromRole="CustomerDemographics" ToRole="Customers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="String" Nullable="false" MaxLength="5" Unicode="true" FixedLength="true" ConcurrencyMode="Fixed" />
|
||||
<Property Name="CompanyName" Type="String" Nullable="false" MaxLength="40" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ContactName" Type="String" MaxLength="30" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ContactTitle" Type="String" MaxLength="30" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Address" Type="String" MaxLength="60" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="City" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Region" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="PostalCode" Type="String" MaxLength="10" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Country" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Phone" Type="String" MaxLength="24" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Fax" Type="String" MaxLength="24" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<NavigationProperty Name="Orders" Relationship="northwindModel.FK_Orders_Customers" FromRole="Customers" ToRole="Orders" />
|
||||
<NavigationProperty Name="CustomerDemographics" Relationship="northwindModel.CustomerCustomerDemo" FromRole="Customers" ToRole="CustomerDemographics" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" ConcurrencyMode="Fixed" />
|
||||
<Property Name="LastName" Type="String" Nullable="false" MaxLength="20" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="FirstName" Type="String" Nullable="false" MaxLength="10" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Title" Type="String" MaxLength="30" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="TitleOfCourtesy" Type="String" MaxLength="25" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="BirthDate" Type="DateTime" ConcurrencyMode="Fixed" />
|
||||
<Property Name="HireDate" Type="DateTime" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Address" Type="String" MaxLength="60" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="City" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Region" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="PostalCode" Type="String" MaxLength="10" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Country" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="HomePhone" Type="String" MaxLength="24" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Extension" Type="String" MaxLength="4" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Photo" Type="Binary" MaxLength="Max" FixedLength="false" />
|
||||
<Property Name="Notes" Type="String" MaxLength="Max" Unicode="true" FixedLength="false" />
|
||||
<Property Name="ReportsTo" Type="Int32" ConcurrencyMode="Fixed" />
|
||||
<Property Name="PhotoPath" Type="String" MaxLength="255" Unicode="true" FixedLength="false" />
|
||||
<NavigationProperty Name="Employees1" Relationship="northwindModel.FK_Employees_Employees" FromRole="Employees" ToRole="Employees1" />
|
||||
<NavigationProperty Name="Employee1" Relationship="northwindModel.FK_Employees_Employees" FromRole="Employees1" ToRole="Employees" />
|
||||
<NavigationProperty Name="Orders" Relationship="northwindModel.FK_Orders_Employees" FromRole="Employees" ToRole="Orders" />
|
||||
<NavigationProperty Name="Territories" Relationship="northwindModel.EmployeeTerritories" FromRole="Employees" ToRole="Territories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Detail">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Int32" Nullable="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ProductID" Type="Int32" Nullable="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="UnitPrice" Type="Decimal" Nullable="false" Precision="19" Scale="4" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Quantity" Type="Int16" Nullable="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Discount" Type="Single" Nullable="false" ConcurrencyMode="Fixed" />
|
||||
<NavigationProperty Name="Order" Relationship="northwindModel.FK_Order_Details_Orders" FromRole="Order_Details" ToRole="Orders" />
|
||||
<NavigationProperty Name="Product" Relationship="northwindModel.FK_Order_Details_Products" FromRole="Order_Details" ToRole="Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" ConcurrencyMode="Fixed" />
|
||||
<Property Name="CustomerID" Type="String" MaxLength="5" Unicode="true" FixedLength="true" ConcurrencyMode="Fixed" />
|
||||
<Property Name="EmployeeID" Type="Int32" ConcurrencyMode="Fixed" />
|
||||
<Property Name="OrderDate" Type="DateTime" ConcurrencyMode="Fixed" />
|
||||
<Property Name="RequiredDate" Type="DateTime" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShippedDate" Type="DateTime" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipVia" Type="Int32" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Freight" Type="Decimal" Precision="19" Scale="4" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipName" Type="String" MaxLength="40" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipAddress" Type="String" MaxLength="60" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipCity" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipRegion" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipPostalCode" Type="String" MaxLength="10" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ShipCountry" Type="String" MaxLength="15" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<NavigationProperty Name="Customer" Relationship="northwindModel.FK_Orders_Customers" FromRole="Orders" ToRole="Customers" />
|
||||
<NavigationProperty Name="Employee" Relationship="northwindModel.FK_Orders_Employees" FromRole="Orders" ToRole="Employees" />
|
||||
<NavigationProperty Name="Order_Details" Relationship="northwindModel.FK_Order_Details_Orders" FromRole="Orders" ToRole="Order_Details" />
|
||||
<NavigationProperty Name="Shipper" Relationship="northwindModel.FK_Orders_Shippers" FromRole="Orders" ToRole="Shippers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" ConcurrencyMode="None" />
|
||||
<Property Name="ProductName" Type="String" Nullable="false" MaxLength="40" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="SupplierID" Type="Int32" ConcurrencyMode="Fixed" />
|
||||
<Property Name="CategoryID" Type="Int32" ConcurrencyMode="Fixed" />
|
||||
<Property Name="QuantityPerUnit" Type="String" MaxLength="20" Unicode="true" FixedLength="false" ConcurrencyMode="Fixed" />
|
||||
<Property Name="UnitPrice" Type="Decimal" Precision="19" Scale="4" ConcurrencyMode="Fixed" />
|
||||
<Property Name="UnitsInStock" Type="Int16" ConcurrencyMode="Fixed" />
|
||||
<Property Name="UnitsOnOrder" Type="Int16" ConcurrencyMode="Fixed" />
|
||||
<Property Name="ReorderLevel" Type="Int16" ConcurrencyMode="Fixed" />
|
||||
<Property Name="Discontinued" Type="Boolean" Nullable="false" ConcurrencyMode="Fixed" />
|
||||
<NavigationProperty Name="Category" Relationship="northwindModel.FK_Products_Categories" FromRole="Products" ToRole="Categories" />
|
||||
<NavigationProperty Name="Order_Details" Relationship="northwindModel.FK_Order_Details_Products" FromRole="Products" ToRole="Order_Details" />
|
||||
<NavigationProperty Name="Supplier" Relationship="northwindModel.FK_Products_Suppliers" FromRole="Products" ToRole="Suppliers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Region">
|
||||
<Key>
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Key>
|
||||
<Property Name="RegionID" Type="Int32" Nullable="false" />
|
||||
<Property Name="RegionDescription" Type="String" Nullable="false" MaxLength="50" Unicode="true" FixedLength="true" />
|
||||
<NavigationProperty Name="Territories" Relationship="northwindModel.FK_Territories_Region" FromRole="Region" ToRole="Territories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Shipper">
|
||||
<Key>
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Key>
|
||||
<Property Name="ShipperID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="CompanyName" Type="String" Nullable="false" MaxLength="40" Unicode="true" FixedLength="false" />
|
||||
<Property Name="Phone" Type="String" MaxLength="24" Unicode="true" FixedLength="false" />
|
||||
<NavigationProperty Name="Orders" Relationship="northwindModel.FK_Orders_Shippers" FromRole="Shippers" ToRole="Orders" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Key>
|
||||
<Property Name="SupplierID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="CompanyName" Type="String" Nullable="false" MaxLength="40" Unicode="true" FixedLength="false" />
|
||||
<Property Name="ContactName" Type="String" MaxLength="30" Unicode="true" FixedLength="false" />
|
||||
<Property Name="ContactTitle" Type="String" MaxLength="30" Unicode="true" FixedLength="false" />
|
||||
<Property Name="Address" Type="String" MaxLength="60" Unicode="true" FixedLength="false" />
|
||||
<Property Name="City" Type="String" MaxLength="15" Unicode="true" FixedLength="false" />
|
||||
<Property Name="Region" Type="String" MaxLength="15" Unicode="true" FixedLength="false" />
|
||||
<Property Name="PostalCode" Type="String" MaxLength="10" Unicode="true" FixedLength="false" />
|
||||
<Property Name="Country" Type="String" MaxLength="15" Unicode="true" FixedLength="false" />
|
||||
<Property Name="Phone" Type="String" MaxLength="24" Unicode="true" FixedLength="false" />
|
||||
<Property Name="Fax" Type="String" MaxLength="24" Unicode="true" FixedLength="false" />
|
||||
<Property Name="HomePage" Type="String" MaxLength="Max" Unicode="true" FixedLength="false" />
|
||||
<NavigationProperty Name="Products" Relationship="northwindModel.FK_Products_Suppliers" FromRole="Suppliers" ToRole="Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Territory">
|
||||
<Key>
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="TerritoryID" Type="String" Nullable="false" MaxLength="20" Unicode="true" FixedLength="false" />
|
||||
<Property Name="TerritoryDescription" Type="String" Nullable="false" MaxLength="50" Unicode="true" FixedLength="true" />
|
||||
<Property Name="RegionID" Type="Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Region" Relationship="northwindModel.FK_Territories_Region" FromRole="Territories" ToRole="Region" />
|
||||
<NavigationProperty Name="Employees" Relationship="northwindModel.EmployeeTerritories" FromRole="Territories" ToRole="Employees" />
|
||||
</EntityType>
|
||||
<Association Name="FK_Products_Categories">
|
||||
<End Role="Categories" Type="northwindModel.Category" Multiplicity="0..1" />
|
||||
<End Role="Products" Type="northwindModel.Product" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Categories">
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Principal>
|
||||
<Dependent Role="Products">
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Customers">
|
||||
<End Role="Customers" Type="northwindModel.Customer" Multiplicity="0..1" />
|
||||
<End Role="Orders" Type="northwindModel.Order" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Customers">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Employees_Employees">
|
||||
<End Role="Employees" Type="northwindModel.Employee" Multiplicity="0..1" />
|
||||
<End Role="Employees1" Type="northwindModel.Employee" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="Employees1">
|
||||
<PropertyRef Name="ReportsTo" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Employees">
|
||||
<End Role="Employees" Type="northwindModel.Employee" Multiplicity="0..1" />
|
||||
<End Role="Orders" Type="northwindModel.Order" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Order_Details_Orders">
|
||||
<End Role="Orders" Type="northwindModel.Order" Multiplicity="1" />
|
||||
<End Role="Order_Details" Type="northwindModel.Order_Detail" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Orders">
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Principal>
|
||||
<Dependent Role="Order_Details">
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Order_Details_Products">
|
||||
<End Role="Products" Type="northwindModel.Product" Multiplicity="1" />
|
||||
<End Role="Order_Details" Type="northwindModel.Order_Detail" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Products">
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Principal>
|
||||
<Dependent Role="Order_Details">
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Shippers">
|
||||
<End Role="Shippers" Type="northwindModel.Shipper" Multiplicity="0..1" />
|
||||
<End Role="Orders" Type="northwindModel.Order" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Shippers">
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="ShipVia" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Products_Suppliers">
|
||||
<End Role="Suppliers" Type="northwindModel.Supplier" Multiplicity="0..1" />
|
||||
<End Role="Products" Type="northwindModel.Product" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Suppliers">
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Principal>
|
||||
<Dependent Role="Products">
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Territories_Region">
|
||||
<End Role="Region" Type="northwindModel.Region" Multiplicity="1" />
|
||||
<End Role="Territories" Type="northwindModel.Territory" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Region">
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Principal>
|
||||
<Dependent Role="Territories">
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="CustomerCustomerDemo">
|
||||
<End Role="CustomerDemographics" Type="northwindModel.CustomerDemographic" Multiplicity="*" />
|
||||
<End Role="Customers" Type="northwindModel.Customer" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="EmployeeTerritories">
|
||||
<End Role="Employees" Type="northwindModel.Employee" Multiplicity="*" />
|
||||
<End Role="Territories" Type="northwindModel.Territory" Multiplicity="*" />
|
||||
</Association>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
<edmx:Mappings>
|
||||
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
|
||||
<EntityContainerMapping StorageEntityContainer="northwindModelStoreContainer" CdmEntityContainer="NorthwindEntities">
|
||||
<EntitySetMapping Name="Categories"><EntityTypeMapping TypeName="northwindModel.Category"><MappingFragment StoreEntitySet="Categories">
|
||||
<ScalarProperty Name="CategoryID" ColumnName="CategoryID" />
|
||||
<ScalarProperty Name="CategoryName" ColumnName="CategoryName" />
|
||||
<ScalarProperty Name="Description" ColumnName="Description" />
|
||||
<ScalarProperty Name="Picture" ColumnName="Picture" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="CustomerDemographics"><EntityTypeMapping TypeName="northwindModel.CustomerDemographic"><MappingFragment StoreEntitySet="CustomerDemographics">
|
||||
<ScalarProperty Name="CustomerTypeID" ColumnName="CustomerTypeID" />
|
||||
<ScalarProperty Name="CustomerDesc" ColumnName="CustomerDesc" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Customers"><EntityTypeMapping TypeName="northwindModel.Customer"><MappingFragment StoreEntitySet="Customers">
|
||||
<ScalarProperty Name="CustomerID" ColumnName="CustomerID" />
|
||||
<ScalarProperty Name="CompanyName" ColumnName="CompanyName" />
|
||||
<ScalarProperty Name="ContactName" ColumnName="ContactName" />
|
||||
<ScalarProperty Name="ContactTitle" ColumnName="ContactTitle" />
|
||||
<ScalarProperty Name="Address" ColumnName="Address" />
|
||||
<ScalarProperty Name="City" ColumnName="City" />
|
||||
<ScalarProperty Name="Region" ColumnName="Region" />
|
||||
<ScalarProperty Name="PostalCode" ColumnName="PostalCode" />
|
||||
<ScalarProperty Name="Country" ColumnName="Country" />
|
||||
<ScalarProperty Name="Phone" ColumnName="Phone" />
|
||||
<ScalarProperty Name="Fax" ColumnName="Fax" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Employees"><EntityTypeMapping TypeName="northwindModel.Employee"><MappingFragment StoreEntitySet="Employees">
|
||||
<ScalarProperty Name="EmployeeID" ColumnName="EmployeeID" />
|
||||
<ScalarProperty Name="LastName" ColumnName="LastName" />
|
||||
<ScalarProperty Name="FirstName" ColumnName="FirstName" />
|
||||
<ScalarProperty Name="Title" ColumnName="Title" />
|
||||
<ScalarProperty Name="TitleOfCourtesy" ColumnName="TitleOfCourtesy" />
|
||||
<ScalarProperty Name="BirthDate" ColumnName="BirthDate" />
|
||||
<ScalarProperty Name="HireDate" ColumnName="HireDate" />
|
||||
<ScalarProperty Name="Address" ColumnName="Address" />
|
||||
<ScalarProperty Name="City" ColumnName="City" />
|
||||
<ScalarProperty Name="Region" ColumnName="Region" />
|
||||
<ScalarProperty Name="PostalCode" ColumnName="PostalCode" />
|
||||
<ScalarProperty Name="Country" ColumnName="Country" />
|
||||
<ScalarProperty Name="HomePhone" ColumnName="HomePhone" />
|
||||
<ScalarProperty Name="Extension" ColumnName="Extension" />
|
||||
<ScalarProperty Name="Photo" ColumnName="Photo" />
|
||||
<ScalarProperty Name="Notes" ColumnName="Notes" />
|
||||
<ScalarProperty Name="ReportsTo" ColumnName="ReportsTo" />
|
||||
<ScalarProperty Name="PhotoPath" ColumnName="PhotoPath" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Order_Details"><EntityTypeMapping TypeName="northwindModel.Order_Detail"><MappingFragment StoreEntitySet="Order Details">
|
||||
<ScalarProperty Name="OrderID" ColumnName="OrderID" />
|
||||
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
|
||||
<ScalarProperty Name="UnitPrice" ColumnName="UnitPrice" />
|
||||
<ScalarProperty Name="Quantity" ColumnName="Quantity" />
|
||||
<ScalarProperty Name="Discount" ColumnName="Discount" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Orders"><EntityTypeMapping TypeName="northwindModel.Order"><MappingFragment StoreEntitySet="Orders">
|
||||
<ScalarProperty Name="OrderID" ColumnName="OrderID" />
|
||||
<ScalarProperty Name="CustomerID" ColumnName="CustomerID" />
|
||||
<ScalarProperty Name="EmployeeID" ColumnName="EmployeeID" />
|
||||
<ScalarProperty Name="OrderDate" ColumnName="OrderDate" />
|
||||
<ScalarProperty Name="RequiredDate" ColumnName="RequiredDate" />
|
||||
<ScalarProperty Name="ShippedDate" ColumnName="ShippedDate" />
|
||||
<ScalarProperty Name="ShipVia" ColumnName="ShipVia" />
|
||||
<ScalarProperty Name="Freight" ColumnName="Freight" />
|
||||
<ScalarProperty Name="ShipName" ColumnName="ShipName" />
|
||||
<ScalarProperty Name="ShipAddress" ColumnName="ShipAddress" />
|
||||
<ScalarProperty Name="ShipCity" ColumnName="ShipCity" />
|
||||
<ScalarProperty Name="ShipRegion" ColumnName="ShipRegion" />
|
||||
<ScalarProperty Name="ShipPostalCode" ColumnName="ShipPostalCode" />
|
||||
<ScalarProperty Name="ShipCountry" ColumnName="ShipCountry" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Products"><EntityTypeMapping TypeName="northwindModel.Product"><MappingFragment StoreEntitySet="Products">
|
||||
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
|
||||
<ScalarProperty Name="ProductName" ColumnName="ProductName" />
|
||||
<ScalarProperty Name="SupplierID" ColumnName="SupplierID" />
|
||||
<ScalarProperty Name="CategoryID" ColumnName="CategoryID" />
|
||||
<ScalarProperty Name="QuantityPerUnit" ColumnName="QuantityPerUnit" />
|
||||
<ScalarProperty Name="UnitPrice" ColumnName="UnitPrice" />
|
||||
<ScalarProperty Name="UnitsInStock" ColumnName="UnitsInStock" />
|
||||
<ScalarProperty Name="UnitsOnOrder" ColumnName="UnitsOnOrder" />
|
||||
<ScalarProperty Name="ReorderLevel" ColumnName="ReorderLevel" />
|
||||
<ScalarProperty Name="Discontinued" ColumnName="Discontinued" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Regions"><EntityTypeMapping TypeName="northwindModel.Region"><MappingFragment StoreEntitySet="Region">
|
||||
<ScalarProperty Name="RegionID" ColumnName="RegionID" />
|
||||
<ScalarProperty Name="RegionDescription" ColumnName="RegionDescription" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Shippers"><EntityTypeMapping TypeName="northwindModel.Shipper"><MappingFragment StoreEntitySet="Shippers">
|
||||
<ScalarProperty Name="ShipperID" ColumnName="ShipperID" />
|
||||
<ScalarProperty Name="CompanyName" ColumnName="CompanyName" />
|
||||
<ScalarProperty Name="Phone" ColumnName="Phone" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Suppliers"><EntityTypeMapping TypeName="northwindModel.Supplier"><MappingFragment StoreEntitySet="Suppliers">
|
||||
<ScalarProperty Name="SupplierID" ColumnName="SupplierID" />
|
||||
<ScalarProperty Name="CompanyName" ColumnName="CompanyName" />
|
||||
<ScalarProperty Name="ContactName" ColumnName="ContactName" />
|
||||
<ScalarProperty Name="ContactTitle" ColumnName="ContactTitle" />
|
||||
<ScalarProperty Name="Address" ColumnName="Address" />
|
||||
<ScalarProperty Name="City" ColumnName="City" />
|
||||
<ScalarProperty Name="Region" ColumnName="Region" />
|
||||
<ScalarProperty Name="PostalCode" ColumnName="PostalCode" />
|
||||
<ScalarProperty Name="Country" ColumnName="Country" />
|
||||
<ScalarProperty Name="Phone" ColumnName="Phone" />
|
||||
<ScalarProperty Name="Fax" ColumnName="Fax" />
|
||||
<ScalarProperty Name="HomePage" ColumnName="HomePage" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<EntitySetMapping Name="Territories"><EntityTypeMapping TypeName="northwindModel.Territory"><MappingFragment StoreEntitySet="Territories">
|
||||
<ScalarProperty Name="TerritoryID" ColumnName="TerritoryID" />
|
||||
<ScalarProperty Name="TerritoryDescription" ColumnName="TerritoryDescription" />
|
||||
<ScalarProperty Name="RegionID" ColumnName="RegionID" />
|
||||
</MappingFragment></EntityTypeMapping></EntitySetMapping>
|
||||
<AssociationSetMapping Name="CustomerCustomerDemo" TypeName="northwindModel.CustomerCustomerDemo" StoreEntitySet="CustomerCustomerDemo">
|
||||
<EndProperty Name="CustomerDemographics">
|
||||
<ScalarProperty Name="CustomerTypeID" ColumnName="CustomerTypeID" />
|
||||
</EndProperty>
|
||||
<EndProperty Name="Customers">
|
||||
<ScalarProperty Name="CustomerID" ColumnName="CustomerID" />
|
||||
</EndProperty>
|
||||
</AssociationSetMapping>
|
||||
<AssociationSetMapping Name="EmployeeTerritories" TypeName="northwindModel.EmployeeTerritories" StoreEntitySet="EmployeeTerritories">
|
||||
<EndProperty Name="Employees">
|
||||
<ScalarProperty Name="EmployeeID" ColumnName="EmployeeID" />
|
||||
</EndProperty>
|
||||
<EndProperty Name="Territories">
|
||||
<ScalarProperty Name="TerritoryID" ColumnName="TerritoryID" />
|
||||
</EndProperty>
|
||||
</AssociationSetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
</edmx:Runtime>
|
||||
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
||||
<Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
|
||||
<Connection>
|
||||
<DesignerInfoPropertySet>
|
||||
<DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
|
||||
</DesignerInfoPropertySet>
|
||||
</Connection>
|
||||
<Options>
|
||||
<DesignerInfoPropertySet>
|
||||
<DesignerProperty Name="ValidateOnBuild" Value="true" />
|
||||
<DesignerProperty Name="EnablePluralization" Value="True" />
|
||||
<DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
|
||||
</DesignerInfoPropertySet>
|
||||
</Options>
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<Diagrams>
|
||||
<Diagram Name="Northwind">
|
||||
<EntityTypeShape EntityType="northwindModel.Category" Width="1.5" PointX="3" PointY="14.5" Height="1.9802864583333317" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.CustomerDemographic" Width="1.5" PointX="0.75" PointY="2.5" Height="1.5956835937500005" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Customer" Width="1.5" PointX="3" PointY="1.5" Height="3.5186979166666661" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Employee" Width="1.5" PointX="3" PointY="8.375" Height="5.2494108072916674" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Order_Detail" Width="1.5" PointX="7.5" PointY="2.125" Height="2.3648893229166656" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Order" Width="1.5" PointX="5.25" PointY="1" Height="4.480205078125" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Product" Width="1.5" PointX="5.25" PointY="15.875" Height="3.5186979166666674" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Region" Width="1.5" PointX="5.75" PointY="7.125" Height="1.5956835937499996" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Shipper" Width="1.5" PointX="3" PointY="5.875" Height="1.7879850260416674" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Supplier" Width="1.5" PointX="3" PointY="17.25" Height="3.5186979166666674" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="northwindModel.Territory" Width="1.5" PointX="8" PointY="9.375" Height="1.9802864583333353" IsExpanded="true" />
|
||||
<AssociationConnector Association="northwindModel.FK_Products_Categories" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="4.5" PointY="16.177643229166666" />
|
||||
<ConnectorPoint PointX="5.25" PointY="16.177643229166666" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Orders_Customers" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="4.5" PointY="3.2593489583333328" />
|
||||
<ConnectorPoint PointX="5.25" PointY="3.2593489583333328" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Employees_Employees" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="3.5319230769230767" PointY="13.624410807291667" />
|
||||
<ConnectorPoint PointX="3.5319230769230767" PointY="13.874410807291667" />
|
||||
<ConnectorPoint PointX="3.9784615384615383" PointY="13.874410807291667" />
|
||||
<ConnectorPoint PointX="3.9784615384615383" PointY="13.624410807291667" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Orders_Employees" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="4.5" PointY="11.203797200520834" />
|
||||
<ConnectorPoint PointX="5.46875" PointY="11.203797200520834" />
|
||||
<ConnectorPoint PointX="5.46875" PointY="5.480205078125" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Order_Details_Orders" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="6.75" PointY="3.3074446614583328" />
|
||||
<ConnectorPoint PointX="7.5" PointY="3.3074446614583328" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Order_Details_Products" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="6.75" PointY="17.634348958333334" />
|
||||
<ConnectorPoint PointX="7.71875" PointY="17.634348958333334" />
|
||||
<ConnectorPoint PointX="7.71875" PointY="4.4898893229166656" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Orders_Shippers" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="4.5" PointY="6.46875" />
|
||||
<ConnectorPoint PointX="5.3281225" PointY="6.46875" />
|
||||
<ConnectorPoint PointX="5.3281225" PointY="5.480205078125" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Products_Suppliers" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="4.5" PointY="18.321848958333334" />
|
||||
<ConnectorPoint PointX="5.25" PointY="18.321848958333334" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.FK_Territories_Region" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="7.25" PointY="7.922841796875" />
|
||||
<ConnectorPoint PointX="7.635416666666667" PointY="7.9228417968749989" />
|
||||
<ConnectorPoint PointX="7.802083333333333" PointY="7.922841796875" />
|
||||
<ConnectorPoint PointX="8.75" PointY="7.922841796875" />
|
||||
<ConnectorPoint PointX="8.75" PointY="9.375" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.CustomerCustomerDemo" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="2.25" PointY="3.2978417968750002" />
|
||||
<ConnectorPoint PointX="3" PointY="3.2978417968750002" /></AssociationConnector>
|
||||
<AssociationConnector Association="northwindModel.EmployeeTerritories" ManuallyRouted="false">
|
||||
<ConnectorPoint PointX="4.5" PointY="10.226898600260416" />
|
||||
<ConnectorPoint PointX="5.385416666666667" PointY="10.226898600260416" />
|
||||
<ConnectorPoint PointX="5.552083333333333" PointY="10.226898600260416" />
|
||||
<ConnectorPoint PointX="7.635416666666667" PointY="10.226898600260416" />
|
||||
<ConnectorPoint PointX="7.802083333333333" PointY="10.226898600260416" />
|
||||
<ConnectorPoint PointX="8" PointY="10.226898600260416" /></AssociationConnector></Diagram></Diagrams>
|
||||
</Designer>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Microsoft.Web.Http.Data.Helpers.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("Microsoft.Web.Http.Data.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="5.0.0-beta2" />
|
||||
<package id="Microsoft.Net.Http" version="2.0.20326.1" />
|
||||
<package id="Moq" version="4.0.10827" />
|
||||
<package id="Newtonsoft.Json" version="4.5.3" />
|
||||
<package id="xunit" version="1.9.0.1566" />
|
||||
<package id="xunit.extensions" version="1.9.0.1566" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче