Skip to main content

Posts

Showing posts from April, 2016

Featured post

XM Cloud content sync from prod to uat or UAT to prod step by step

When working with Sitecore, it’s common to need content synchronization across environments. Today, I’ll walk you through the steps to sync content from Production to UAT/TEST and vice versa. Steps to Follow 1. Set Up Your Workspace Create a folder on your computer where you will manage the script files and exported data. Open the folder path in PowerShell to begin scripting. We need to run some scripts in PowerShell to update the folder with the basic requirements for syncing content. PS C:\Soft\ContentSync> dotnet new tool-manifest PS C:\Soft\ContentSync> dotnet nuget add source -n Sitecore https://nuget.sitecore.com/resources/v3/index.json PS C:\Soft\ContentSync> dotnet tool install Sitecore.CLI PS C:\Soft\ContentSync> dotnet sitecore cloud login If the above error occurs, you will need to run a different command to resolve the issue. PS C:\Soft\ContentSync> dotnet sitecore init now, Again run above command to open and authenticate with XM Cloud. It will be there a...

How to use extension method in C#

See the below example of extension method. Here , I have created static method in static class . Name "PrintHello" will be call from anther method by declaration of any string variable. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { public static class StringHelper { public static string PrintHello(this string name) { return "Hello , " + name; } } } Here, I have call static method from above to below given code. I have created string name as "name" and directly called the above created static method "PrintHello" that will return the output as "Hello Surendra". --------------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { public class Program ...

AngularJS best practice with WebAPI and MVC

Angular-Js with MVC + Web API Pagination + Sorting with Angular JS You may also check :  Insert,delete,update,select using angularjs with mvc Here in this tutorial, we will try to show, How to create ASP.Net MVC project using Angular JS, Create Database in Sql Server and Create WebApi. I wil going to describe in proper way to Binding the Data in Angular Grid. Here, I am using Entity framework 5.0 . Step 1:- Create ASP.Net MVC Project with VS2013                    1. Open your VS IDE 2013            2. Go to file menu and select New              3. Click on create Project            4. Asp.Net Web Application                Select MVC template, Click on Add button, Give name as DemoApp.                Now you...

Best practice over OOPS in C#

To become a expert in OOPS you  should  know about below point. OOPS concept in asp.net C#. Some of main important point which is below. 1.     Class 2.     Object 3.     Variable 4.     Method/Function 5.     Encapsulation 6.     Abstraction 7.     Inheritance 8.     Polymorphism 9.     Abstract Class/Method 10.   Virtual Method 11.   Sealed Class/Method 12.   Static Class/Method 13.   Interface 14.   Access Modifiers

How to use filter in angularjs

See the some below syntax which help you to organise how to use filter.    Filters in angular JS You may also check :  Insert,delete,update,select using angularjs with mvc <table> <tr data-ng-repeat=”employee in employees”> <td>{{employee.name|uppercase}}</td> <td>{{employee.dateOfBirth|date:”dd/MM/yyyy”}}</td> <td>{{employee.gender|lowercase}}</td> <td>{{employee.salary|number:2}}</td> <td>{{employee.salary|currency:$:2}}</td> < /tr> </table>

Angularjs best practice tutorial with proper syntax

You may also check :  Insert,delete,update,select using angularjs with mvc 1:  {{{Name:"shashi", Mobile:"9540108013", City: “Delhi"}.Name}} Result=> shashi 2:  {{['Surendra','Prabhat','Vinay'][1]}}   Result=> Prabhat 3:  {{1==1}} Result=> true 4:  {{1==2}}  Result=> false 5:  var myApp=angular.module("myModule",[])              //Create The Module var myController=function($scope) {                           // Create The Controller $scope.message="Angular JS Tutorial"; };  myApp.controller("myController",myController);        // Register The Controller With The  //Module 6:  var myApp=angular.module("myModule",[])                //Create The Module myApp.controller("myController",function($scope) {     ...

How to use ternary operator ?

The conditional operator return single value from two value according to condition which is applied. Example of Ternary operator is. You may also check :   Insert,delete,update,select using angularjs with mvc condition ? first_expression : second_expression; int five=5; string answer=((five==5)?(“true”):(“false”); using System; class Program { static void Main() { Console.WriteLine(GetValue("Sam")); Console.WriteLine(GetValue("Jane")); } static int GetValue(string name) { return name == "Sam" ? 100 : -1; } } Output 100 -1

Difference between WCF and Web API and WCF REST and Web Service

.Net framework has allow to create HTTP service by using three way such as Web Service,WCF and WEB API. You may also check :   Insert,delete,update,select using angularjs with mvc I am going to explain about these three HTTP Services step by step. WCF   What is the full form of WCF ?  Full form of WCF is  window communication foundation. WCF creates service oriented application and use to send data asynchronously   from one end point to another end point. Some importants points to be remember of WCF. 1.     We need to enable webHttpBindings to use wcf service 2.     It returns data in xml format and it is based on SOAP. 3.     It is the evolution of the web service(ASMX) and support various protocols like TCP, HTTP, HTTPS, Named Pipes, MSMQ 4.     It can be call by any client but not open source. 5.     It includes the chat service that allows th...