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
<?xml version="1.0" encoding="UTF-8"?> | |
<quote-request> | |
<api-token>7E0480BC761D5434</api-token> | |
<vehicle-list> | |
<vehicle> | |
<vehicle-type>2001</vehicle-type> | |
<vehicle-make>Honda</vehicle-make> | |
<vehicle-model>Civic</vehicle-model> | |
<vehicle-year>2016</vehicle-year> | |
<running-status>1</running-status> |
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
-- original source: http://edspencer.me.uk/2013/02/25/drop-all-tables-in-a-sql-server-database-azure-friendly/ | |
-- drop all constraint | |
while(exists(select 1 from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE='FOREIGN KEY')) | |
begin | |
declare @sql1 nvarchar(2000) | |
SELECT TOP 1 @sql1=('ALTER TABLE ' + TABLE_SCHEMA + '.[' + TABLE_NAME | |
+ '] DROP CONSTRAINT [' + CONSTRAINT_NAME + ']') | |
FROM information_schema.table_constraints | |
WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' |
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 BaseOdataController<TRepository, TEntity> : EntitySetController<TEntity, int> | |
where TRepository : IRepository<TEntity> | |
where TEntity : class | |
{ | |
private readonly IUnitOfWork _unitOfWork; | |
private readonly TRepository _repository; | |
public BaseOdataController(IUnitOfWork unitOfWork) | |
{ | |
_unitOfWork = unitOfWork; |
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 BaseRepository<TEntity> : IRepository<TEntity> where TEntity : class | |
{ | |
protected readonly DbContext _context; | |
protected readonly DbSet<TEntity> _dbSet; | |
protected BaseRepository(DbContext context) | |
{ | |
_context = context; | |
_dbSet = context.Set<TEntity>(); | |
} |
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
.k-dropdown { | |
background-color: transparent !important; | |
} | |
.k-dropdown .k-dropdown-wrap, .k-dropdown.k-state-border-down .k-dropdown-wrap.k-state-border-down { | |
padding: 5px !important; | |
border: 1px solid #959694 !important; | |
border-radius: 20px 20px 20px 20px !important; | |
} | |
.k-dropdown .k-dropdown-wrap .k-select, .k-ie .k-dropdown .k-dropdown-wrap .k-select, .k-ff .k-dropdown .k-dropdown-wrap .k-select { | |
background-color: #f6f7ef !important; |
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 ObjectComparer | |
{ | |
public static bool Equals(object left, object right) | |
{ | |
//Compare the references | |
if (object.ReferenceEquals(right, null)) | |
return false; | |
if (object.ReferenceEquals(left, right)) | |
return true; |
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
<configuration> | |
//...... | |
//...... | |
<system.web> | |
<httpHandlers> | |
<add path="*.js" verb="GET,HEAD" type="System.Web.StaticFileHandler" /> | |
<add path="*.css" verb="GET,HEAD" type="System.Web.StaticFileHandler" /> | |
<add path="*" verb="*.cshtml" type="System.Web.HttpNotFoundHandler"/> |