Skip to content

Instantly share code, notes, and snippets.

View Kaidanov's full-sized avatar

Tzvi Gregory Kaidanov Kaidanov

View GitHub Profile
@Kaidanov
Kaidanov / Entity Framework children serialization with .Net Core 2 WebAPI
Last active June 17, 2018 09:52
Removing circular entity rendering, handling Camel convension, No need for additional attributes on properties, Serializer per entity type , Including children of children in response, Removing backslash from JSON by returning Content
public class Contact
{
public int Id { get; set; }
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
...
//[JsonIgnore]
@Kaidanov
Kaidanov / Entity Framework children serialization WebAPI
Created June 17, 2018 09:48
Removing backslash from JSON by returing Content
public class Contact
{
public int Id { get; set; }
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
...
//[JsonIgnore]
@Kaidanov
Kaidanov / Entity Framework children serialization WebAPI
Created June 17, 2018 09:48
Removing backslash from JSON by returing Content
public class Contact
{
public int Id { get; set; }
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
...
//[JsonIgnore]
@Kaidanov
Kaidanov / angular5-checkbox-array-reactive-forms-handler.html
Last active May 30, 2018 15:04
Angular 5 Reactive Forms - Checkbox array mat-selection-list simple sample
<div class="col-md-6" *ngIf="notifications && notifications.length > 0">
<label class="example-margin">Notifications to send:</label>
<mat-selection-list [(ngModel)]="selectedNotifications" [ngModelOptions]="{standalone: true}">
<mat-list-option *ngFor="let n of notifications" [checkboxPosition]="before" [value]="n.id+'_'+n.description">
<mat-icon matListIcon>notifications</mat-icon>
{{n.description}}
</mat-list-option>
</mat-selection-list>
</div>
@Kaidanov
Kaidanov / angular5-checkbox-array-reactive-forms-handler.html
Last active May 30, 2018 13:54
Angular 5 Reactive Forms - Checkbox array handle - mat-checkbox simple
<div class="row">
<!--First column-->
<div class="col-md-12">
<section class="checkbox-section text-center" *ngIf="notifications && notifications.length > 0">
<label class="example-margin">Notifications to send:</label>
<p *ngFor="let n of notifications" formArrayName="notification">
<mat-checkbox class="checkbox-margin" (change)="updateChkbxArray(n, $event.checked, 'notification')" value="n.id">{{n.description}}</mat-checkbox>
</p>
</section>
</div>
@Kaidanov
Kaidanov / Google maps autocomplete getPlace response example
Created October 3, 2017 19:17
Google maps autocomplete getPlace response example json formatted
{
"address_components": [
{
"long_name": "Mazkeret Batya",
"short_name": "Mazkeret Batya",
"types": [
"locality",
"political"
]
},
@Kaidanov
Kaidanov / dabblet.css
Created January 13, 2012 05:44
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #000;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;