Commit Graph

27752 Commits

Author SHA1 Message Date
Doug Bunting 48f09d0e8d Do not trounce existing property values that are not bound in `TryUpdateModel` scenarios
- #2836

Part 1: Use existing property values when recursing in `MutableObjectModelBinder`
- remove `ComplexModelDTO` because that indirection made fixing this issue more difficult and doesn't add value
  - started with an old closed PR (#2241) which did some of this work
- correct `MutableObjectModelBinderTest` tests that exercised behaviour that can't occur
  - the old `dto.Results` dictionary was never incomplete; nor could it contain `null` values

Part 2: Change `MutableObjectModelBinder` to pass complex property values into binding system
- model binding no longer trounces nodes in the model tree that aren't bound
- create model instances less often in `TryUpdateModel` scenarios
  - refactor `EnsureModel()` to `GetModel()` and use appropriately
- reorder logic in `SetProperty()` and `AddToProperty()` to avoid copying to / from the same collection
  - also cleans up some code duplication

nits:
- clean up `MutableObjectModelBinderTest`
  - fix odd line wrappings and indentation
  - use `nameof()` more
  - use `string.Empty` more
  - simplify a couple of `Returns()` expressions
- make assertions in `TryUpdateModelIntegrationTest` more readable
  - no need to work through `ModelStateDictionary.Keys`
  - also use `Length` instead of `Count()`; test code but we don't need Linq at all in that test class
2015-08-18 09:57:41 -07:00
Stephen Halter 58292c6620 Update "Kestrel" dependency in samples after rename 2015-08-17 15:55:04 -07:00
Pranav K fba99312e3 Merge branch 'release' into dev 2015-08-17 14:49:41 -07:00
Pranav K 8a1d9f4a12 Updating to release NuGet.config. 2015-08-17 14:49:39 -07:00
Pranav K 7085e8ab4d Merge branch 'release' into dev 2015-08-17 14:49:37 -07:00
Pranav K 459b271a44 Updating to release NuGet.config. 2015-08-17 14:49:34 -07:00
Pranav K f33a71ae19 Merge branch 'release' into dev 2015-08-17 14:49:32 -07:00
Pranav K e0d60f7549 Updating to release NuGet.config. 2015-08-17 14:49:30 -07:00
Pranav K 4a08399052 Merge branch 'release' into dev 2015-08-17 14:49:27 -07:00
Pranav K 8389d740b9 Updating to release NuGet.config. 2015-08-17 14:49:25 -07:00
Pranav K e300e592ec Merge branch 'release' into dev 2015-08-17 14:49:23 -07:00
Pranav K 4b7c990b3e Updating to release NuGet.config. 2015-08-17 14:49:21 -07:00
Pranav K 35bdc80e50 Merge branch 'release' into dev 2015-08-17 14:49:18 -07:00
Pranav K 6706b60dee Updating to release NuGet.config. 2015-08-17 14:49:16 -07:00
Pranav K 276a51fd2b Merge branch 'release' into dev 2015-08-17 14:49:14 -07:00
Pranav K 17e43d49c2 Updating to release NuGet.config. 2015-08-17 14:49:12 -07:00
Pranav K d5b0065553 Merge branch 'release' into dev 2015-08-17 14:49:09 -07:00
Pranav K 05b496782a Updating to release NuGet.config. 2015-08-17 14:49:07 -07:00
Pranav K fc7c3a6c3a Merge branch 'release' into dev 2015-08-17 14:49:04 -07:00
Pranav K c9ca9fee47 Updating to release NuGet.config. 2015-08-17 14:49:02 -07:00
Pranav K b0a55ebd36 Merge branch 'release' into dev 2015-08-17 14:48:59 -07:00
Pranav K cadf2f8f71 Updating to release NuGet.config. 2015-08-17 14:48:57 -07:00
Pranav K 4cdabf172d Merge branch 'release' into dev 2015-08-17 14:48:55 -07:00
Pranav K b47e6ecf28 Updating to release NuGet.config. 2015-08-17 14:48:53 -07:00
Pranav K 8f13f18e36 Merge branch 'release' into dev 2015-08-17 14:48:50 -07:00
Pranav K d1ecd8e29b Updating to release NuGet.config. 2015-08-17 14:48:48 -07:00
Pranav K c46fc555ae Merge branch 'release' into dev 2015-08-17 14:48:46 -07:00
Pranav K ed9cd0ec11 Updating to release NuGet.config. 2015-08-17 14:48:44 -07:00
Pranav K 87eebdd0c1 Merge branch 'release' into dev 2015-08-17 14:48:41 -07:00
Pranav K 113a86d6a3 Updating to release NuGet.config. 2015-08-17 14:48:39 -07:00
Pranav K fa187a7cad Merge branch 'release' into dev 2015-08-17 14:48:27 -07:00
Pranav K b6bb7a52a2 Updating to release NuGet.config. 2015-08-17 14:48:25 -07:00
Pranav K c693b69793 Merge branch 'release' into dev 2015-08-17 14:48:18 -07:00
Pranav K d45b0a27e9 Updating to release NuGet.config. 2015-08-17 14:48:16 -07:00
Pranav K 1f1feb298d Merge branch 'release' into dev 2015-08-17 14:48:04 -07:00
Pranav K 7ca6982883 Updating to release NuGet.config. 2015-08-17 14:48:02 -07:00
Pranav K 73d959fae7 Merge branch 'release' into dev 2015-08-17 14:47:55 -07:00
Pranav K 17b7e92fc3 Updating to release NuGet.config. 2015-08-17 14:47:52 -07:00
Pranav K 94640d290c Merge branch 'release' into dev 2015-08-17 14:46:59 -07:00
Pranav K 1a29f7f93a Updating to release NuGet.config. 2015-08-17 14:46:57 -07:00
Pranav K e5bea0fa1e Switching to aspnetrelease feed in Universe
Short term fix in the absence of ability to do this via build.cmd.
2015-08-17 14:39:01 -07:00
Pranav K 0b8a3e8fcb Updating to release NuGet.config 2015-08-17 14:10:40 -07:00
Pranav K b87497c6da Tweaking update-release target to be runnable from the CI
* Relying on git log --exit-code to fail in case there are unmerged
  changes in the release branch.
* Specifically update aspnetvnext feed when branching to release.
2015-08-17 14:09:05 -07:00
Troy Dai 72ce66a300 Update packages' versions 2015-08-17 11:13:06 -07:00
Troy Dai e4722b0bef Update packages' versions 2015-08-17 11:11:16 -07:00
Troy Dai 9dd9d39bff Update packages' versions 2015-08-17 11:10:26 -07:00
Brice Lambson e8fc5a970a React to aspnet/EntityFramework#2831 2015-08-17 10:24:21 -07:00
Chris R 8735d455f9 Only run Kerberos tests if the machine is joined to the domain. 2015-08-17 09:46:49 -07:00
David Fowler 52388e89f8 Removed builder arg parameter from IStartupFilter
- It broke the composition model by allowing you to
reach out to the original app builder. This breaks
the ability to properly wrap and have all configure
methods see the wrapper.
2015-08-16 19:16:49 -07:00
Ryan Nowak 9d89a8cac3 Homogenize MVC startup code patterns
Use builder APIS for both AddMvc() and AddMvcCore()
Change various API patterns to all use .AddXyz(...) off of one or both of
these builders.
2015-08-16 18:48:24 -07:00