This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare @TableName sysname = 'Registration' | |
declare @Result varchar(max) = 'public class ' + @TableName + ' | |
{' | |
select @Result = @Result + ' | |
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } | |
' | |
from | |
( | |
select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class EntityBaseMap<T> : ClassMap<T> where T : EntityBase<T> | |
{ | |
protected EntityBaseMap() | |
{ | |
DynamicUpdate(); // Hibernate will update the modified columns only. | |
Id(x => x.Id).Column("Id"); // Numberic Id | |
Map(x => x.IsDeleted); | |
Map(x => x.CreatedAt); | |
OptimisticLock.Version(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomDialect : SQLiteDialect | |
{ | |
protected override void RegisterColumnTypes() | |
{ | |
base.RegisterColumnTypes(); | |
RegisterColumnType(DbType.DateTime2, "DATETIME2"); | |
} | |
protected override void RegisterFunctions() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPut] | |
[Authorize(Roles = "VendorAdmin")] | |
[Route("{id:int}/SetPrice/{price:decimal}")] | |
public IHttpActionResult SetPrice(int id, decimal price) | |
{ | |
//... | |
try | |
{ | |
PricingAgreementItemService.SetPrice(id, price); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('PricingAgreementItemSvc', function ($resource) { | |
return $resource('/api/pricingAgreementItem/:id/:action/:value\\/', { id: '@id' }, | |
{ | |
// ... | |
setPrice: { | |
method: 'PUT', | |
params: { | |
id: '@id', | |
action: 'SetPrice', | |
value: '@value' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../Scripts/jasmine/jasmine.js" /> | |
/// <reference path="../../Scripts/angular.js" /> | |
/// <reference path="../../Scripts/angular-mocks.js" /> | |
/// <reference path="../../Scripts/angular-resource.js" /> | |
/// <reference path="../../Scripts/angular-route.js" /> | |
/// <reference path="../../Scripts/ui-bootstrap-tpls-0.6.0.js" /> | |
/// <reference path="../app.js" /> | |
/// <reference path="../DataEntry/DataEntryCtrl.js" /> |