Rename ConcurrencyToken to Concurrency
This commit is contained in:
@@ -3,7 +3,7 @@ PRIORITY - ALWAYS Lowest level stuff first
|
|||||||
|
|
||||||
---
|
---
|
||||||
todo: API REFACTORING (note: workordercontroller / biz should be following all these rules so it's the template if need reference)
|
todo: API REFACTORING (note: workordercontroller / biz should be following all these rules so it's the template if need reference)
|
||||||
todo: get rid of PATCH in all routes
|
|
||||||
todo: consider renaming ConcurrencyToken to a shorter string?
|
todo: consider renaming ConcurrencyToken to a shorter string?
|
||||||
todo: all api route parameters, post object sb "newObject", put="putObject"
|
todo: all api route parameters, post object sb "newObject", put="putObject"
|
||||||
IN BIZ TOO
|
IN BIZ TOO
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ The above example shows multiple validation errors ([API error code](api-error-c
|
|||||||
|
|
||||||
AyaNova uses "optimistic concurrency" tracking. This means a concurrency token needs to accompany most change (PUT, PATCH) routes.
|
AyaNova uses "optimistic concurrency" tracking. This means a concurrency token needs to accompany most change (PUT, PATCH) routes.
|
||||||
|
|
||||||
Objects that require concurrency tokens to update are the objects that return a `ConcurrencyToken` property on a GET request.
|
Objects that require concurrency tokens to update are the objects that return a `Concurrency` property on a GET request.
|
||||||
|
|
||||||
Every update to an object results in a new concurrency token for that object.
|
Every update to an object results in a new concurrency token for that object.
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
public class UpdateAttachmentInfo
|
public class UpdateAttachmentInfo
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string DisplayFileName { get; set; }
|
public string DisplayFileName { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
@@ -114,7 +114,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
//Log event and save context
|
//Log event and save context
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentModified, ChangeTextra), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentModified, ChangeTextra), ct);
|
||||||
@@ -492,7 +492,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
async private Task<object> GetFileListForObjectAsync(AyaType ayaType, long ayaId)
|
async private Task<object> GetFileListForObjectAsync(AyaType ayaType, long ayaId)
|
||||||
{
|
{
|
||||||
var l = await ct.FileAttachment.AsNoTracking().Where(m => m.AttachToObjectId == ayaId && m.AttachToObjectType == ayaType)
|
var l = await ct.FileAttachment.AsNoTracking().Where(m => m.AttachToObjectId == ayaId && m.AttachToObjectType == ayaType)
|
||||||
.Select(m => new { m.Id, m.ConcurrencyToken, m.ContentType, m.DisplayFileName, m.LastModified, m.Notes })
|
.Select(m => new { m.Id, m.Concurrency, m.ContentType, m.DisplayFileName, m.LastModified, m.Notes })
|
||||||
.ToArrayAsync();
|
.ToArrayAsync();
|
||||||
var v = l.OrderBy(m => m.DisplayFileName);
|
var v = l.OrderBy(m => m.DisplayFileName);
|
||||||
return v;
|
return v;
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
//If concurrency token specified then check if ours is newer
|
//If concurrency token specified then check if ours is newer
|
||||||
if (concurrencyToken != null)
|
if (concurrencyToken != null)
|
||||||
{
|
{
|
||||||
if (o.ConcurrencyToken == concurrencyToken)
|
if (o.Concurrency == concurrencyToken)
|
||||||
{
|
{
|
||||||
//returns a code 304 (NOT MODIFIED)
|
//returns a code 304 (NOT MODIFIED)
|
||||||
return StatusCode(304);
|
return StatusCode(304);
|
||||||
@@ -175,7 +175,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = oFromDb.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = oFromDb.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -354,7 +354,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = oFromDb.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = oFromDb.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -252,7 +252,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -359,7 +359,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -467,7 +467,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -575,7 +575,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -681,7 +681,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -787,7 +787,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -893,7 +893,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -999,7 +999,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1105,7 +1105,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1211,7 +1211,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));
|
||||||
}
|
}
|
||||||
return Ok(ApiOkResponse.Response(new { ConcurrencyToken = o.ConcurrencyToken }, true));
|
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency }, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.Contract.AddAsync(outObj);
|
await ct.Contract.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.Customer.AddAsync(outObj);
|
await ct.Customer.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace AyaNova.Biz
|
|||||||
} while (NotUnique);
|
} while (NotUnique);
|
||||||
outObj.Name = newUniqueName;
|
outObj.Name = newUniqueName;
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ namespace AyaNova.Biz
|
|||||||
CopyObject.Copy(inObj, dbObj, "Id");
|
CopyObject.Copy(inObj, dbObj, "Id");
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
await ValidateAsync(dbObj, false);
|
await ValidateAsync(dbObj, false);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ namespace AyaNova.Biz
|
|||||||
CopyObject.Copy(inObj, dbObj, "Id");
|
CopyObject.Copy(inObj, dbObj, "Id");
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
await ValidateAsync(dbObj, false);
|
await ValidateAsync(dbObj, false);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace AyaNova.Biz
|
|||||||
throw new System.Exception("GlobalBizSettingsBiz::ReplaceAsync -> Global settings object not found in database!!");
|
throw new System.Exception("GlobalBizSettingsBiz::ReplaceAsync -> Global settings object not found in database!!");
|
||||||
CopyObject.Copy(inObj, dbObj, "Id");
|
CopyObject.Copy(inObj, dbObj, "Id");
|
||||||
|
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
Validate(dbObj);
|
Validate(dbObj);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.HeadOffice.AddAsync(outObj);
|
await ct.HeadOffice.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.LoanUnit.AddAsync(outObj);
|
await ct.LoanUnit.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
// outObj.Id = 0;
|
// outObj.Id = 0;
|
||||||
// outObj.ConcurrencyToken = 0;
|
// outObj.Concurrency = 0;
|
||||||
|
|
||||||
// await ct.PM.AddAsync(outObj);
|
// await ct.PM.AddAsync(outObj);
|
||||||
// await ct.SaveChangesAsync();
|
// await ct.SaveChangesAsync();
|
||||||
@@ -165,7 +165,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = putObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = putObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.PMTemplate.AddAsync(outObj);
|
await ct.PMTemplate.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.Part.AddAsync(outObj);
|
await ct.Part.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.Project.AddAsync(outObj);
|
await ct.Project.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.PurchaseOrder.AddAsync(outObj);
|
await ct.PurchaseOrder.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
// outObj.Id = 0;
|
// outObj.Id = 0;
|
||||||
// outObj.ConcurrencyToken = 0;
|
// outObj.Concurrency = 0;
|
||||||
|
|
||||||
// await ct.Quote.AddAsync(outObj);
|
// await ct.Quote.AddAsync(outObj);
|
||||||
// await ct.SaveChangesAsync();
|
// await ct.SaveChangesAsync();
|
||||||
@@ -165,7 +165,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = putObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = putObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.QuoteTemplate.AddAsync(outObj);
|
await ct.QuoteTemplate.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ namespace AyaNova.Biz
|
|||||||
dbObj.Display = inObj.NewText;
|
dbObj.Display = inObj.NewText;
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
//Only thing to validate is if it has data at all in it
|
//Only thing to validate is if it has data at all in it
|
||||||
if (string.IsNullOrWhiteSpace(inObj.NewText))
|
if (string.IsNullOrWhiteSpace(inObj.NewText))
|
||||||
@@ -265,7 +265,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(titem).OriginalValues["ConcurrencyToken"] = tit.ConcurrencyToken;
|
ct.Entry(titem).OriginalValues["Concurrency"] = tit.Concurrency;
|
||||||
|
|
||||||
//Only thing to validate is if it has data at all in it
|
//Only thing to validate is if it has data at all in it
|
||||||
if (string.IsNullOrWhiteSpace(tit.NewText))
|
if (string.IsNullOrWhiteSpace(tit.NewText))
|
||||||
@@ -294,7 +294,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
await ValidateAsync(dbObj.Name, false);
|
await ValidateAsync(dbObj.Name, false);
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.Unit.AddAsync(outObj);
|
await ct.Unit.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.UnitModel.AddAsync(outObj);
|
await ct.UnitModel.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
@@ -464,7 +464,7 @@ namespace AyaNova.Biz
|
|||||||
// return new
|
// return new
|
||||||
// {
|
// {
|
||||||
// Id = o.Id,
|
// Id = o.Id,
|
||||||
// ConcurrencyToken = o.ConcurrencyToken,
|
// Concurrency = o.Concurrency,
|
||||||
// Active = o.Active,
|
// Active = o.Active,
|
||||||
// Name = o.Name,
|
// Name = o.Name,
|
||||||
// Roles = o.Roles,
|
// Roles = o.Roles,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace AyaNova.Biz
|
|||||||
CopyObject.Copy(inObj, dbObj, "Id, UserId");
|
CopyObject.Copy(inObj, dbObj, "Id, UserId");
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
Validate(dbObj);
|
Validate(dbObj);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.Vendor.AddAsync(outObj);
|
await ct.Vendor.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
//Test get serial id visible id number from generator
|
//Test get serial id visible id number from generator
|
||||||
outObj.Serial = ServerBootConfig.WIDGET_SERIAL.GetNext();
|
outObj.Serial = ServerBootConfig.WIDGET_SERIAL.GetNext();
|
||||||
@@ -143,7 +143,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace AyaNova.Biz
|
|||||||
CopyObject.Copy(dbObject, newObject, "Wiki");
|
CopyObject.Copy(dbObject, newObject, "Wiki");
|
||||||
newObject.Serial = ServerBootConfig.WORKORDER_SERIAL.GetNext();
|
newObject.Serial = ServerBootConfig.WORKORDER_SERIAL.GetNext();
|
||||||
newObject.Id = 0;
|
newObject.Id = 0;
|
||||||
newObject.ConcurrencyToken = 0;
|
newObject.Concurrency = 0;
|
||||||
await ct.WorkOrder.AddAsync(newObject);
|
await ct.WorkOrder.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
||||||
@@ -170,7 +170,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await WorkOrderValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await WorkOrderValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
return null;
|
return null;
|
||||||
@@ -414,7 +414,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await ItemValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await ItemValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
return null;
|
return null;
|
||||||
@@ -665,7 +665,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await ExpenseValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await ExpenseValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -854,7 +854,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await LaborValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await LaborValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -1042,7 +1042,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await LoanValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await LoanValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -1231,7 +1231,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await PartValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await PartValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -1417,7 +1417,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await PartRequestValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await PartRequestValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -1606,7 +1606,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await ScheduledUserValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await ScheduledUserValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -1795,7 +1795,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await TaskValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await TaskValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -1984,7 +1984,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await TravelValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await TravelValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
@@ -2173,7 +2173,7 @@ namespace AyaNova.Biz
|
|||||||
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
dbObject.Tags = TagUtil.NormalizeTags(dbObject.Tags);
|
||||||
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
dbObject.CustomFields = JsonUtil.CompactJson(dbObject.CustomFields);
|
||||||
|
|
||||||
ct.Entry(dbObject).OriginalValues["ConcurrencyToken"] = dtPutObject.ConcurrencyToken;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = dtPutObject.Concurrency;
|
||||||
await UnitValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
await UnitValidateAsync(dbObject, SnapshotOfOriginalDBObj);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
outObj.Id = 0;
|
outObj.Id = 0;
|
||||||
outObj.ConcurrencyToken = 0;
|
outObj.Concurrency = 0;
|
||||||
|
|
||||||
await ct.WorkOrderTemplate.AddAsync(outObj);
|
await ct.WorkOrderTemplate.AddAsync(outObj);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Set "original" value of concurrency token to input token
|
//Set "original" value of concurrency token to input token
|
||||||
//this will allow EF to check it out
|
//this will allow EF to check it out
|
||||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
ct.Entry(dbObj).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
|
|
||||||
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
await ValidateAsync(dbObj, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace AyaNova.Models
|
|||||||
{
|
{
|
||||||
//Any object that has a concurrencytoken field
|
//Any object that has a concurrencytoken field
|
||||||
//set it up to work properly with PostgreSQL
|
//set it up to work properly with PostgreSQL
|
||||||
if (property.Name == "ConcurrencyToken")
|
if (property.Name == "Concurrency")
|
||||||
{
|
{
|
||||||
property.SetColumnName("xmin");
|
property.SetColumnName("xmin");
|
||||||
property.SetColumnType("xid");
|
property.SetColumnType("xid");
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace AyaNova.Models
|
|||||||
public class Contract
|
public class Contract
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class Customer
|
public class Customer
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace AyaNova.Models
|
|||||||
public class DataListView
|
public class DataListView
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public long UserId { get; set; }//only relevant if non-public for fetching either in list or single (public true OR userid matches)
|
public long UserId { get; set; }//only relevant if non-public for fetching either in list or single (public true OR userid matches)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
public class Event
|
public class Event
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public long UserId { get; set; }
|
public long UserId { get; set; }
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace AyaNova.Models
|
|||||||
public class FileAttachment
|
public class FileAttachment
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace AyaNova.Models
|
|||||||
public class FormCustom
|
public class FormCustom
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required, MaxLength(255)]
|
[Required, MaxLength(255)]
|
||||||
public string FormKey { get; set; }//max 255 characters ascii set
|
public string FormKey { get; set; }//max 255 characters ascii set
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.Models
|
|||||||
public class GlobalBizSettings
|
public class GlobalBizSettings
|
||||||
{
|
{
|
||||||
public long Id { get; set; }//this is always 1 as there is only ever one single global biz object
|
public long Id { get; set; }//this is always 1 as there is only ever one single global biz object
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
//Global settings
|
//Global settings
|
||||||
//Picklist and other searches override the normal case insensitive value
|
//Picklist and other searches override the normal case insensitive value
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class HeadOffice
|
public class HeadOffice
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class LoanUnit
|
public class LoanUnit
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
// [Required]
|
// [Required]
|
||||||
// public long O wnerId { get; set; }
|
// public long O wnerId { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class PM
|
public class PM
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public uint Serial { get; set; }
|
public uint Serial { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
public class PMItem
|
public class PMItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class PMTemplate
|
public class PMTemplate
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class PMTemplateItem
|
public class PMTemplateItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class Part
|
public class Part
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace AyaNova.Models
|
|||||||
public class PickListTemplate
|
public class PickListTemplate
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
public string Template { get; set; }//JSON fragment of picklist template
|
public string Template { get; set; }//JSON fragment of picklist template
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class Project
|
public class Project
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class PurchaseOrder
|
public class PurchaseOrder
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
public class Quote
|
public class Quote
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public uint Serial { get; set; }
|
public uint Serial { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
public class QuoteItem
|
public class QuoteItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class QuoteTemplate
|
public class QuoteTemplate
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class QuoteTemplateItem
|
public class QuoteTemplateItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.Models
|
|||||||
public class SearchDictionary
|
public class SearchDictionary
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required, MaxLength(255)]
|
[Required, MaxLength(255)]
|
||||||
public string Word { get; set; }//max 255 characters ascii set
|
public string Word { get; set; }//max 255 characters ascii set
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace AyaNova.Models
|
|||||||
public class SearchKey
|
public class SearchKey
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.Models
|
|||||||
public class Tag
|
public class Tag
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required, MaxLength(255)]
|
[Required, MaxLength(255)]
|
||||||
public string Name { get; set; }//max 255 characters
|
public string Name { get; set; }//max 255 characters
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace AyaNova.Models
|
|||||||
public class Translation
|
public class Translation
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class TranslationItem
|
public class TranslationItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class Unit
|
public class Unit
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class UnitModel
|
public class UnitModel
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public bool Active { get; set; }
|
public bool Active { get; set; }
|
||||||
[Required, MaxLength(255)]
|
[Required, MaxLength(255)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
@@ -32,7 +32,7 @@ namespace AyaNova.Models
|
|||||||
public class User
|
public class User
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool Active { get; set; }
|
public bool Active { get; set; }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.Models
|
|||||||
public class UserOptions
|
public class UserOptions
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public long TranslationId { get; set; }
|
public long TranslationId { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class Vendor
|
public class Vendor
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class Widget
|
public class Widget
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace AyaNova.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public uint Serial { get; set; }
|
public uint Serial { get; set; }
|
||||||
@@ -38,7 +38,7 @@ namespace AyaNova.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public uint Serial { get; set; }
|
public uint Serial { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
@@ -40,7 +40,7 @@ namespace AyaNova.Models
|
|||||||
Units = new List<WorkOrderItemUnit>();
|
Units = new List<WorkOrderItemUnit>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.Models
|
|||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string CustomFields { get; set; }
|
public string CustomFields { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class WorkOrderTemplate
|
public class WorkOrderTemplate
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.Models
|
|||||||
public class WorkOrderTemplateItem
|
public class WorkOrderTemplateItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace AyaNova.Models
|
|||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public string NewText { get; set; }
|
public string NewText { get; set; }
|
||||||
public uint ConcurrencyToken { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user