2017年4月7日 星期五

設定div 高度為最大可用高度

.directive('grid', function () {
        return {
            link: function (scope, elem, attrs) {
                $(elem).height($(window).height() - $(elem).offset().top);
            }
        };
    })

Entity Framework 建立新物件並儲存後馬上取得關聯資料

使用 CreateProxy 建立物件,不要直接 new var newmodel = _contextXXX.CreateProxy<yyy>(); ... _contextXXX.yyy.Add(newmodel); await _contextXXX.SaveC...