Skip to content

Feed aggregator

Access Collection Types in XAML

C-Sharpcorner - Latest Articles - 17 hours 8 min ago
How to access a collection type in your XAML code.
Categories: Communities

Unit of Work in Repository Pattern

C-Sharpcorner - Latest Articles - Sat, 09/20/2014 - 20:20
Unit of Work is the concept related to the effective implementation of the repository pattern.
Categories: Communities

Getting Started With Repository Pattern Using C#

C-Sharpcorner - Latest Articles - Sat, 09/20/2014 - 08:00
This article explains the repository pattern and will create a simple example to provide a basic idea of how the this pattern works.
Categories: Communities

How to Set Formats into Excel File from C# Code

C-Sharpcorner - Latest Articles - Sat, 09/20/2014 - 08:00
In this article you will learn how to Set Formats into Excel File from C# Code
Categories: Communities

Get Cities by Country Using Web Service Without DataBase

C-Sharpcorner - Latest Articles - Sat, 09/20/2014 - 08:00
In this article we will learn how to get all the cities by countries using an ASP.NET Web Service without a database.
Categories: Communities

Improving Code Quality by Strategy Design Pattern

C-Sharpcorner - Latest Articles - Sat, 09/20/2014 - 08:00
This article explains the Strategy Design Pattern that is a very simple design pattern.
Categories: Communities

Choosing Right Type of WCF Project

C-Sharpcorner - Latest Articles - Sat, 09/20/2014 - 08:00
This article describes how to choose the right type of WCF Project.
Categories: Communities

Kinect for Windows V2 SDK: Mouse, Pen, Fingers, Hands

Mike Taulty's Blog - Fri, 09/19/2014 - 15:55
One of the things that Windows 8 did when it came along with its new app development model was to do some unification around the way in which “a device that can point” is represented. In the early days, I found myself often looking for a “Mouse Down” style...(read more)
Categories: Blogs

What is new in RavenDB 3.0: Operations–the pretty pictures tour

Ayende @ Rahien - Fri, 09/19/2014 - 15:48

This has been the most important change in RavenDB 3.0, in my opinion. Not because of complexity and scope, pretty much everything here is much simpler than other features than we have done. But this is important because it makes RavenDB much easier to operate. Since the get go, we have tried to make sure that RavenDB would be a low friction system. We usually focused on the developer experience, and that showed when we had to deal with operational issues.

Things were more complex than they should. Now, to be fair, we had the appropriate facilities to figure things out, ranging from debug endpoints, to performance counters to a great debug log story. The problem is that in my eye, we were merely on par with other systems. RavenDB wasn’t created to be on par, RavenDB was created so when you use this, you would sigh and say “that is how it should be done”. With RavenDB 3.0, I think we are much closer to that.

Because we have done so much work here, I’m going to split things to multiple posts. This one is the one with all the pretty pictures, as you can imagine. Next one will talk about the actual operational behavior changes we made.

Let me go over some of those things with you. Here you can see the stats view, including looking at an index details.

image

That is similar to what we had before. But it gets interesting when we want to start actually looking at the data more deeply. Here are the indexing stats on my machine:

image

You can see that the Product/Sales index has a big fanout, by the fact that it has more items out than in, for example. You can also see how much items we indexed per batch, and how we do parallel indexing.

We also have a lot more metrics to look at. The current requests view along several time frames.

image

The live index work view:

image

The indexing batch size and the perfetching stats graph gives us live memory consumption usage for indexing, as well as some view on what indexing strategy is currently in use.

Combining those stats, we have a lot of information at our fingertips, and can get a better idea about what exactly is going on inside RavenDB.

But so far, this is just to look at things, let us see what else we can do. RavenDB does a lot of things in the background. From bulk insert work to set based operations. We added a view that let you see those tasks, and cancel them if you need to:

image

 

You can now see all the work done by the replication background processes, which will give you a better idea on what your cluster is doing. And of course there is the topology view that we already looked at.

image

We also added views for most of the debug endpoints that RavenDB has. Here we are looking at the subscribed changes connections.

image

 

We get a lot of metrics available for us now. In fact, we went a bit crazy there and started tracking a lot of stuff. This will help you understand what is going on internally. And you can also get nice histograms.

image

There is a lot of stuff there, so I won’t cover it all, but I would show you what I think is one of the nicest features:

image

This will give you real stats about resource usage in your system. Including counts of documents per collection and the size on disk.

Okay, that is enough with the pretty pictures, on my next post, I’ll talk about the actual changes we made to support operations better.

Categories: Blogs

What is new in RavenDB 3.0: SQL Replication

Ayende @ Rahien - Fri, 09/19/2014 - 11:42

imageSQL Replication has been a part of RavenDB for quite some time,showing up for the first time in the 1.0 build as the Index Replication Bundle. This turned out to be a very useful feature, and in 3.0 we had a dedicated developer for this for several weeks, banging it into new and interesting shapes.

We started out with a proper design for how you want to use it. And I’m just going to take you through the process for a bit, then talk about the backend changes.

We start by defining a named connection string (note that you can actually test this immediately):

image

And then we define the actual replication behavior:

image

Note that we have the Tools control in the top? Clicking it and selecting Simulate will give you:

image

So you can actually see the commands that we are going to execute to replicate a specific document. That is going to save a lot of head scratching about “why isn’t this replicating properly”.

You can even run this simulation against your source db, to check for errors such as constraint violations, etc.

The SQL Replication bundle now support forcing query recompilation, which avoid bad query plans caching in SQL Server:

image

And for the prudent DBA, we have done a lot to give you additional information. In particular, you can look at the metrics and see what is going on.

image

And:

image

In this case, I actually don’t have a relational database on this machine to test this, but I’m sure that you can figure it out.

The nice thing about it, we’ll report separate metrics per table, so your DBA can see if a particular table is causing a slow down.

Overall, we streamlined everything and tried to give you as much information upfront as possible, as well as tracking the entire process. You’ll find it much easier to work with and troubleshoot if needed.

This actually ties very well with our next topic, the operations changes in RavenDB to make it easier to manager. But that will be in the a future post.

Categories: Blogs

Get dotMemory 4.1 Beta

JetBrains .NET Tools Blog - Fri, 09/19/2014 - 11:24

It’s been a while since dotMemory 4.0 was released, and we’ve spent all this time baking a new batch of .NET memory profiling goodies for you. Please welcome dotMemory 4.1 Beta, bringing you more rigorous, convenient and beautiful profiling experience.

Here are the must-try features in dotMemory 4.1 Beta:

Disable/Enable collection allocations on the fly. To profile certain functionality of your app without slowing down all of its other areas, try disabling allocations collection directly from the real-time profiling control view. Feel free to comment on DMRY-2317 in dotMemory issue tracker.
Collection allocations
Detect more common issues in a single click. To help you focus on what really needs your attention, we’ve added a new automatic inspection: String duplicates detects the issue and shows how much memory is wasted (DMRY-2232). Two more recently added automatic inspections, both related to WPF, were announced earlier in v4.0.10.
String duplicates inspection
Copy, save and share profiling results. Simply press Ctrl+C to copy current analysis results to the clipboard. Selection and copying of multiple rows is supported for all “Type List” views, all nicely formatted and ready to be compared or shared (DMRY-454).
Formatted copy of analysis results
Get more data on GC roots. Starting from this update, dotMemory shows you the name of the field through which a static object is referenced. (DMRY-774). Later we plan to publish a good read on GC roots basics, so stay tuned.
Named static reference
Enjoy restyled UI icons. Our notion of profiling is that it should be clear, productive and even beautiful. That’s why this update features new great-looking UI icons for your viewing pleasure.
Refreshed UI icons
Name your analysis. Easily order and manage multiple memory investigations by providing your analysis tabs with custom names. Never again get lost in loads of various unnamed analyses.
Custom analysis name

dotMemory 4.1 should be out in just a couple of weeks. For now, go ahead, download dotMemory 4.1 Beta and try on all the new things shipped with this update. Feel free to share any feedback you may have:

We’re eager to hear from you, and make dotMemory 4.1 better with your help and input.

Profile with pleasure!
The dotMemory Team

Categories: Companies

Microsoft’s Windows App Studio Beta: Connecting a Menu App to Azure Mobile Service

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 09:38
The purpose of this article is to connect the Menu App from Windows App Studio with Azure Mobile Service, using the .Net back end.
Categories: Communities

Joining Orchard part records in HQL

In yesterday’s post, I showed the basics of HQL querying in Orchard. It is by far the most flexible way to  query Orchard’s database, but one thing I didn’t show is how this works in relation to Orchard’s content type system. Querying over records is nice, but if those records are part records, you need to be really careful and check that they correspond to a real content item, that his content hasn’t been archived, and that its publication state is what you need it to be. In order to do that, you’ll have to join with ContentItemRecord and ContentItemVersionRecord. But how do you express joins in HQL in a way that works with Orchard records?

I would recommend you always start from the content item version record:

FROM Orchard.ContentManagement.Records.ContentItemVersionRecord ItemVersion

Then, you can join that to the content item record:

JOIN ItemVersion.ContentItemRecord Item

It’s easy to understand what’s going on here, because the ContentItemVersionRecord does have a ContentItemRecord property, that is of type ContentItemRecord. The mapping convention is easy and explicit here.

Joining with other part records, such as a UserPartRecord, is a little more puzzling, but works almost magically:

JOIN Item.UserPartRecord User

There is no UserPartRecord property on ContentItemRecord, so how does this work? Well, remember that Orchard creates mappings automatically from a bunch of conventions. It knows in particular that content items are aggregated from parts, and that when those parts are associated with a part record, joins should be made on the Id column of the part record and of the item record.

Finally, you’ll want to add some constraints, if you want to restrict what versions you want to get. For example, if you only want published versions, you’d add:

WHERE ItemVersion.Published = true

Wrapping it all together, here is a query that will get you all the ids for users that have no role:

SELECT DISTINCT User.Id
FROM Orchard.ContentManagement.Records.ContentItemVersionRecord ItemVersion
JOIN ItemVersion.ContentItemRecord Item
JOIN Item.UserPartRecord User
WHERE ItemVersion.Published = true
AND User.Id NOT IN (SELECT Role.UserId FROM Orchard.Roles.Models.UserRolesPartRecord Role)

Can you feel this series building itself? Next time, we’ll see how to get actual results out of those queries.

Categories: Blogs

Memory Usage of Your App - Windows Phone 8.1

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
This articles helps you determine how much memory your app is using.
Categories: Communities

Obsolete Attribute in C#

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
In this article we learn what the Obsolete Attribute is and why to use it.
Categories: Communities

Terms as Search Refiners in SharePoint 2013

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
In this article we explore how to convert Managed Metadata Terms into Search Refiners.
Categories: Communities

Nintex Forms in SharePoint 2013 / Office 365

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
In this article you will learn how to use Nintex forms in SharePoint 2013.
Categories: Communities

Logging and Intercepting Database Operations With Entity Framework 6.0

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
In this article you will learn how to log and intercept database operations with Entity Framework 6.0.
Categories: Communities

Uploading Stream/Images to REST API Using RestSharp

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
In this article you will learn how to upload a Stream or Images to the REST API using RestSharp.
Categories: Communities

Operator Overloading in C#

C-Sharpcorner - Latest Articles - Fri, 09/19/2014 - 08:00
In this article we are going to learn operator overloading, and the basic concepts of operator overloading.
Categories: Communities