Skip to content

Code changes history

Roman Ivantsov edited this page Apr 9, 2017 · 35 revisions

For changes before May 2016 check the document at old location on codeplex.

Version 1.9.2, Feb 4, 2017

  • The biggest new thing is the Job Execution Module. More information here: https://github.com/rivantsov/vita/blob/master/3.Modules/Vita.Modules/JobExecution/AboutJobEngine.txt
  • Upgraded data providers packages to newest available versions. Except Postgres provider, could not make it work with the latest, upgraded to highest 'working' version.
  • LoggingApp - allow enable modules/logs selectively.
  • Login module - multiple minor changes; if you use this module and/or its API, make sure you double-check all places that might be impacted:
    UserName is not Nullable anymore in Login module. Good news - all methods in Login API are now commented, you can see all information in Swagger (in BooksUI app). LoginInfo object used in Login API is refactored - old bool fields are gone, now only bit flags. URL structure in Rest API for multi-factor login is refactored - look at Swagger page. Refresh token for user session is now returned in LoginResponse - you can use it to refresh session token before it expires. PasswordResetController.StartProcess now returns 'boxed' object with string value inside (see comments on the method for explanation). Bug fix - second login without logout was returning old session token, not new one. Pins and temp password now contain only 'safe' chars - excluding those that look alike (ex: 0 and letter O). New API endpoint to submit point for email verification - not requiring user to be logged in; use it in direct-hit link in email. And some other minor changes in Login module/API.
  • EntityApp.ActivationLog - refactored and renamed into SystemLog. EntityApp.ActivationLogPath is deprecated, use SystemLogPath property - assign file name (or full path) to persist system log. System log contains system messages about system startup/shutdown. ErrorLog fixed - in case of failure to write to database, writes to SystemLog, not Windows EventLog (causes permission problems). So in Web apps, make sure app can write to file located at SystemLogPath value.
  • SQlite driver refactored, now relies mostly on default formatting/conversions by SQLite.NET provider. Should fix reported problems of reading existing databases.
  • New option DbOptions.AddSchemaToTableName - for servers like SQlite that do not support schemas; for SQlite the flag is set by default. With this flag, schema is prefixed to table names: mysch_MyTable. Allows better management of big models.
  • OAuthClientModule refactoring/fixes. Added Authorized event fired when OAuth process is completed successfully. Fixed OAuthDemoApp.
  • WebApiClient error handling refactoring; ErrorHandler class/property is removed; new event Error added, to allow custom error processing.
  • UpdateQuery enhancement - now correctly supports skip, take, order-by clauses.
  • DisplayAttribute fixed (and much improved the code), now handles more cases correctly
  • New attribute PropagateUpdatedOn - put it on reference property (IBookOrder.Order), and each change of 'this' child entity will cause UpdatedOn property on parent entity (BookOrder) to update, as if the parent was modified itself. Allows tracking of 'last-changed-date' on doc header, including changes to child records ONLY.
  • Added EntitySession.TransactionTags property - a dictionary that can store extra keys/values, cleared automatically on transaction end. Can be used for things like tracking added extra operations in automatic handlers, to avoid doing it multiple times. Used in PropagateUdatedOn attribute.
  • Setting string column to single space - fixed, now non-nullable string column accepts single space value. (but not string.Empty)
  • Allowing foreign key columns to be declared explicitly - now does not fail if a column like 'Order_Id' is declared explicitly next to IOrderLine.Order property. Previously was failing because .Order property was trying to create underlying column Order_Id.
  • Bug fix - calculated property with both Get and Set was causing error (hanging) at startup; now fixed.
  • SearchParams.DefaultIfNull helper method (used in construction of search queries) now has maxRows parameters; allows you to limit max number of rows to return.
  • Preparing for .NET Core - multiple refactorings to prepare for .NET Core migration - next release for sure. ObjectCache is rewritten, no longer uses MemoryCache object.

Next release main focus - .NET Core.

Version 1.9, Oct 6, 2016

Many bug fixes, refactorings; WebClientLog - new log module

  • WebClientLogModule - for logging all Web client calls (HttpClient). Essentially logs all calls to external APIs. WebApiClient class automatically logs all call into this log/table. The module is part of LoggingApp.
  • Bug fix: Views requiring Order-By clause - fixed.
  • Async-sync bridge - refactored - the AsyncHelper class refactored; now much simpler implementation of sync/async bridge.
  • Support for OrderBy attribute on list properties - now the attribute actually works in these places. PersistOrderIn attribute also sets OrderBy automatically.
  • Fixed resetting database scenario in unit tests - discovered that Extended tests do not work with config option 'ResetDatabase=true'. It even can corrupt installation of the server (MySql). The problem was that the operation was trying to Drop too much - including system tables. Now fixed. Advice - do not run unit test using DB server's root account.
  • Extra login options - the login info object sent to Login API endpoint now has a property ExpirationType - the client can decide what kind of expiration to use. There is also a new option - LongFixedTerm; a new method/API endpoint - RefreshToken, to get new token before old one expires
  • Refactoring for .NET Core - removed dependency on System.Data.DataSet, .NET Core version does not have it.

Version 1.8.7.4, Aug 23 2016

Patch release, mostly bug fixes and minor improvements

  • MS SQL: XX_ArrayById procs fix - added CAST expression to generated stored procs, those selecting by array of IDs. Previously was used in LINQ, but forgot to add this to auto-generated procedures
  • MS SQL: added READ_COMMITTED_SNAPSHOT=ON script to enable snapshot isolation; turns out this must be done too, to handle locks properly
  • WebApiClient - added mapping options - now you can map PascalCase properties in models to all-lower-with-underscore names in JSON. Ex: FirstName <-> first_name; mapping happens automatically (used this in MailChimp client, makes life a bit easier)

Version 1.8.7.0, July 10 2016

This update was driven primarily by current needs of the app that we build at my workplace, so it happens to be more about Web API features rather than ORM/database things.

  • Swagger - support for Swagger API document pages. Run sample BookStore UI app and click on Api Docs link on the left - you will see Swagger UI with 'documentation' for all available controller endpoints. Xml comments are integrated also, look at Login controller, one of the methods shows a doc line. Something to be completed. Look at SwaggerConfig.cs file for the ways to set it up. One change compared to default configuration by Swashbuckle: the setup method is called explicitly (not thru web-init attribute at assembly level) - in this case it must be called before Route config method. Endpoints are grouped by controller name, but you can set group explicitly with ApiGroup attribute.
  • OAuth 2.0 Client (re-)implementation. OAuthClientModule was rebuilt to support full OAuth 2.0 flow. A new demo/test app in samples folder: OAuthClientDemoApp. The module pre-installs the info about some popular OAuth servers (Google, WindowsLive, Facebook, etc), including their 'specifics' expressed as flags. Run the demo app and see full OAuth cycle for each server. Note - you have to provide your own app registration info with target servers; see instructions there right in the app. The module comes with set of API controllers that can be used directly in a web app.
  • DataHistory module - a simple, almost primitive way to save history of changes for a table. BookStore app now uses this module to track every change (and all past versions) of BookReview entities. Look at unit test for the feature to see how it works. Properties for previous versions are saved in a dictionary serialized in a text column.
  • DataAccess service refactored a bit - IDataSourceManagementService is no longer there, all methods are in IDataAccessService, which is available directly in EntityApp.DataAccess. For convenience of dynamically hooking up databases (data sources) on the run, there is an event now DataSourceAdd which is fired when data source specified by name in OperationContext is missing - an app code in event handler can dynamically hookup a new data source. Those who use multi-tenant scenario would need to adjust their code a bit.
  • OneToOne attribute - to construct back-ref properties for one-to-one scenarios (when foreign key in child entity is also a primary key in child). Example - look at party module. IOrg entity references IParty (and it is PK also); so IParty has Org property with OneToOne attribute - this is a reference without underlying column, derived from back ref IOrg.Party -> Party.
  • New options to disable stored procs and batch mode in entity session - used in some modules like DbInfo and ErrorLog, that might need to execute db commands when stored procs are 'not ready yet'.
  • LINQ queires with array parameters - refinement for MS SQL, now queries have explicit cast to target type in sub-select. The goal is to avoid confusing query optimizer that was picking up index scan instead of seek without this CAST.
  • Multiple subtle bug fixes:
    1. Bug in computed property, event firing for DependsOn properties;
    2. Fixed DateTime parameter 'formatting' in LINQ queries for SQLite;
    3. Writing wrong current version in DbUpgrageLog module (was writing LoggingApp version, not the main app version)
    4. Detecting CascadeDelete change attribute on a property - previously was not catching it when it was the only change.
Clone this wiki locally