معرفی XAML Islands v1
1- اندازه گیری تعداد Transactionها در واحد زمان روی یک Database خاص در SQL Server
جهت بدست آوردن تعداد Transactionها در واحد زمان( Transactions Per Second ) روی یک Database خاص در یک سیستم عملیاتی، جهت ارتقاء سخت افزاری ، تست فشار و ... میتوانید از یک DMV با نام sys.dm_os_performance_counters به طریق زیر استفاده نمائید:declare @cntr_value bigint Select @cntr_value=cntr_value from sys.dm_os_performance_counters where instance_name='AdventureWorks' and counter_name='Write Transactions/sec' /* ایجاد یک تاخیر مثلاً یک ثانیه */ waitfor delay '00:00:01' Select cntr_value -@cntr_value from sys.dm_os_performance_counters where instance_name='AdventureWorks' and counter_name='Write Transactions/sec'
2- sys.sp_MSforeachtable
از رویههای ذخیره شده UnDocumented در SQL Server میباشد و این قابلیت را دارا است که برای هر یک از جداول موجود در یک بانک اطلاعاتی، یک رویهای را اجرا کند. برای مثال با استفاده از دستور زیر، میتوانید تعداد سطرها، اندازهی دادهها و ایندکسهای یک جدول را بدست آورید
EXEC sys.sp_MSforeachtable 'sp_spaceused ''?''';
USE [AdventureWorksDW2008R2] GO CREATE TABLE #TableSpaceUsed( [name] [nvarchar](120) NULL, [rows] [nvarchar](120) NULL, [reserved] [nvarchar](120) NULL, [data] [nvarchar](120) NULL, [index_size] [nvarchar](120) NULL, [unused] [nvarchar](120) NULL ) ON [PRIMARY] Insert Into #TableSpaceUsed EXEC sys.sp_MSforeachtable 'sp_spaceused ''?'''; Select * from #TableSpaceUsed Order by CAST([rows] as int) desc Drop table #TableSpaceUsed
پیاده سازی DDD در دات نت
Next-gen database for powerful React and React Native apps that scales to 10,000s of records and remains fast
Build powerful React and React Native apps that scale from hundreds to tens of thousands of records and remain fast
بنده PersianDatePicker رو در پروژه خودم به کار گرفتم اما ظاهرا زمانی که بجای استفاده از Post Model از پیاده سازی PostViewModel استفاده میکنیم، datepicker به درستی عمل نمیکنه، البته در نمایش تقویم و انتخاب تاریخ مشکلی نیست بلکه در تبدیل شمسی به میلادی و ارسال به سرور مشکل داره و نهایتا فیلد addDate مقدار {01/01/0001 12:00:00 ق.ظ} رو میگیره.
Post ViewModel به صورت:
namespace MvcAppPersianDatePicker.ViewModels { public class PostViewModel { public Post post { get; set; } } }
و Home کنترلر:
namespace MvcAppPersianDatePicker.Controllers { public class HomeController : Controller { [HttpGet] public ActionResult Index() { var model = new PostViewModel(); model.post = new Post() { AddDate = DateTime.Now.AddDays(-1), Title = "تست" }; return View(model); } [HttpPost] public ActionResult Index(PostViewModel model) { if (ModelState.IsValid) { // todo: save data return RedirectToAction("Index"); } return View(model); } } }
بررسی Domain Driven Design بخش اول
One of the most exciting announcements during this year’s Connect(); event was the ability to embed .NET libraries into existing iOS (Objective-C/Swift) and Android (Java) applications with .NET Embedding. This is great because you can start to share code between your iOS and Android applications, and you can also share the user interface between your apps when you combine .NET Embedding with Xamarin.Forms Native Forms. This means that you can leverage your existing investments and apps without having to re-write them from scratch to start adding cross-platform logic and UI. In fact, during the Connect(); keynote I showed how I was able to extend the open source Swift-based Kickstarter iOS application with .NET Embedding and Xamarin.Forms Native Forms. You can check out the clip below.