Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (21 sloc) 543 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace Northwind.Model
{
public static class ModelExtension
{
/// <summary>
/// Method Extension untuk mengkonversi object ke json
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="obj"></param>
/// <returns></returns>
public static string ToJson<T>(this T obj)
{
return JsonConvert.SerializeObject(obj);
}
}
}