Friday, December 20, 2013

to find the size of tables in a database of sql server

SET NOCOUNT ON

DBCC UPDATEUSAGE(0)

-- DB size.
EXEC sp_spaceused

-- Table row counts and sizes.
CREATE TABLE #t
(
    [name] NVARCHAR(128),
    [rows] CHAR(11),
    reserved VARCHAR(18),
    data VARCHAR(18),
    index_size VARCHAR(18),
    unused VARCHAR(18)
)

INSERT #t EXEC sp_msForEachTable 'EXEC sp_spaceused ''?'''

SELECT *
FROM   #t

-- # of rows.
SELECT SUM(CAST([rows] AS int)) AS [rows]
FROM   #t

DROP TABLE #t



sp_spaceused INST_SUBCOURSE_INFO

design patterns

Learn Design pattern with Sukesh Marla


Course Fee – 25k


1.      Brush-up your object oriented skills – class, object, interface, abstract classes
2.      Pillars of Object oriented programming
3.      What is mean by principle?
4.      Some Object oriented principles – KISS, DRY, PINC…
5.      What is SOLID?
6.      SRP
7.      OCP
8.      LSP
9.      ISP
10.  DIP
11.  Architectural style, Architectural Pattern, Design Pattern
12.  What is Design Pattern?
13.  Categories of Design Pattern
14.  One Pattern from every category – Iterator, Proxy and Prototype
15.  Factory
16.  Abstract
17.  Singleton
18.  Builder
19.  Adapter
20.  Bridge
21.  Composite
22.  Decorator
23.  Façade
24.  Flyweight
25.  COR
26.  Command
27.  Interpreter
28.  Mediator
29.  Memento
30.  Observer
31.  State
32.  Strategy
33.  Template
34.  Visitor
35.  DI and IOC
36.  UOW and Repository Pattern
37.  Architectural Pattern – MVC,MVP and MVVM

mvc

Learn MVC with Sukesh Marla

Course Fee – 25k ,  Current discounted fee - 21k (Limited offer)

1.    Why we need MVC?  
2.    Why we need Asp.net MVC – Problem with Code behind.
3.    How MVC Works –
1.    Understand the architecture?
2.    How request is processed?
3.    Request in Web Forms vs Request in MVC

4.    How Requests are mapped to Controller and Action
1.    Application_Start function
2.    Examining Default route and URL pattern
3.    What is that “Id” in Default route
4.    Query strings vs Id
5.    Nullable parameters in URL
6.    Creating custom routes
7.    What is IgnoreRoutes – Ignore requests for axd files (example tracing – enable and check)
(Asp.net concepts will be applicable for MVC also)
5.    Simple MVC Application
1.    Return Simple string from Controller
( How it is different from WebForm Simple string display)
2.    What you can return from Action method
3.    What happen if you return any object
4.    Working with Views – Return a simple View
5.    ActionResult vs View() function
6.    Why controller action method return ActionResult
6.    Razor View Engine
7.    Pass data from controller to view using ViewData and ViewBag
1.    ViewData-Dictionary of objects that are stored and retrieved using string as keys
2.    Viewbag – uses dynamic feature in c# 4.0. It allows an object to have properties dynamically added to it.
3.    Working with ViewData and Viewbag together
(Show looping in view)
4.    HTML Injections
8.    Problems with ViewBag and View Data and what is best practice
1.    No Compile error
2.    Performance – Casting is required
9.    Models in MVC
1.    What is Model
2.    What It contains
3.    Where does Database logic resides
4.    Create a strongly typed view and check first line(top directive)
·         Strongly typed view of simple objects
·         Strongly typed view of collection objects
10.  @model in Razor
11.  Simple Example of Data access in Model using EF
12.  Working with input controls in views – Textbox,DropDown
13.  Passing data from View to Controller -Working with post request
1.    Request.Form
2.    FormCollection
3.    Getting posted values as parameters (Model Binder map control values to paramets in action method and for 
that it uses Name of properties and Name of controls)
(Order of the parameter does not matter)
4.    Get Posted values as Model
14.  Using HTMLHelper - HTML helper is just a method that returns a string. – used to render html content on view
1.    Textbox,Label,Password,   TextArea,Hidden,dropdown,DisplayFor
2.    Specialty when we used HTMLHelpers.
3.    ModelState.Clear and ModelState.Remove
Model cant contain invalid values
4.    Control vs ControlFor
5.    How to change values of some properties
6.    Creating own htmlhelper
7.    DisplayName Attribute
15.  HttpPost and Httpget attribute – Only Respond to particular request
16.  UpdateModel vs TryUpdateModel – One throw exception if validation fails
17.  Inlcuding and excluding properties from Model binding
1.    Using Bind attribute in post action parameter
2.    Using Interface – (UpdateModel Generic function- Use interface)
3.    Using UpdateModel overload
4.    Using Get Http Methods for deleting data – Search engine issue
18.  What is ActionName Attribute
19.  Creating hyperlinks using HTMLHelper – Html.actionlink
1.    Normal redirect
2.    Pass Values (using route values)
20.  Some Action results – specific to transfer
1.    Return view  - Server.Transfer
2.    return view(“name”) - Server.Transfer
3.    redirectToAction(“name”) – Response.Redirect – Uses route table to generate the correct url - cause the browser to receive a 302
4.    Redirect – Same as RedirectToAction but manual construction of url
5.    RedirectToRoute    - look up the specifies route into the Route table that is is defined in global.asax and then redirect to that controller/action defined in that route.
(same as redirectToAction)
6.    Redirect and redirect permanent 
21.  What is tempdata
22.  Model validation
1.    ModelState.valid
2.    DataAnnotations – Required attribute
3.    HtmlHeper Validation controls
4.    Custom data annotation
·         ValidationAttribute
·         ViewModel
·         IValidatableObject
5.    Disable some validations ModelState["DependentProperty"].Errors.Clear();
6.    Clientside validation
7.    Disable Client side validation for some button
8.    Obstructive ….
23.  Creating custom Helper Methods
24.  Controller Folder vs Shared Folder
25.  Partial Views  - reuse a view
26.  Display and Editor Templates
1.    Display vs DisplatyFor vs DisplayForModel.
2.    Editor vs EditorFor vs EditorForModel
3.    DisplayTemplates and EditorTemplates
27.  Action method will pick up what when you have all four , .aspx, .ascx, .cshtml and.vbhtml [Look at the error]
28.  Partial and render partial 
29.  Action vs RenderAction
30.  Is there more action results?
1.    ContentResult
2.    EmptyResult   - Async Controller
3.    FileResult
4.    HttpStatusCodeResut
5.    JavascriptResult
6.    JsonResult
7.    RedirectResult
8.    RedirectToRouteResult
9.    ViewResultBase
31.  Master Page
1.    MasterPages in ASPX
2.    Layouts in RAZOR
3.    MasterPages vs Layouts   
4.    Nested Master pages
5.    Nested Layouts
6.    _Viewstart
32.  Exception Handling in MVC
1.    Custom Error in Web.config
2.    Handle error – Global level
3.    Handle error – controller/action level
4.    HTTP 404
5.    Access errorInfo in ErrorFile
6.    Different Error Page for Different error
7.    Limitations of HandleError –
·         No logging,
·         For Ajax Call error  return same view
·         Catch only 500
·         No outside controller error handling
8.    Extend HandleError

33.  What is Unit Testing
34.  Simple example of MOQ DLL 
35.  Testing routes 
36.  Testing controllers 

37.  Filters 
1.    Authorization Filters
2.    Action Filters – Allow us to add Pre or post processing logic to action methods
3.    Result Filter – Allow us to add Pre or Post processing logic before and after execution of a view result 
4.    ExceptionFiler – Allow us error handling logic occurred during execution of action
38.  Webpage API 

39.  MVC with Ajax 
40.  MVC JQuery 
41.  Areas 

42.  Deployment in IIS
43.  Windows authentication- video
44.  Forms authentication 
1.    How Form Authentication works
2.    Login Page
3.    Allow Anonymous attribute
4.    Creating cookie

45.  Threading, TPL and Async await Simple sample
46.  Asynchronous controllers 
47.  Entity framework with MVC 
48.  MVC 4 – Bundling and Minimization
49.  Discussion on repository Pattern
50.  Discussion on ViewModel in MVC
51.Custom Model Binders

Learn .net Fundamentals

Learn .net Fundamentals

Course Fee – 30k

v  .Net Basics
o   Lecture 1
§  .Net Framework
§  Assmbly (Difference between other assembly and .net assembly
§  Dll vs EXE
§  Manifest
§  Namespace vs Assemble
§  Compilation of .net Code , IL Code (Half compiled Code)
§  JIT
§  NGEN
§  .Net Architecture
§  CAS
o   Lecture 2
§  Dll Hell
§  Versioning
§  String Names, Weakly typed references and strongly typed references,
§  Private vs Shared Assembly
§  Gac Util
§  Delay signing
o   Lecture 3
§  Value types, Reference Types, Stack, Heap
§  Ref vs. Out
§  Boxing, Unboxing and performance
§  GC,GC Cycle
§  Managed vs. Unmanaged objects
§  Constructor and Destructors
§  Finalize dispose pattern
v  OOPS and C#
o   Lecture 4
§  Why do we need OOPS? (Reusability with classes)
·         What is mean building
·         Problems with Procedural programming
o   Confusions -> We had all functions together - No Separation
o   Data is not protected
o   Increase in size because of physical include
o   Too many functions with different names doing same kind operations
o   Difficulties in reusing Existing Files
§  Class and Object
§  Instance vs. static member
§  Static member, functions, constructors and classes
§  Access Modifiers
§  Encapsulation and how
§  Abstraction
§  Encapsulation vs. abstraction
o   Lecture 5
§  Constructors and Destructors
§  Types of constructors
§  Inheritance and its types
§  Constructors with Inheritance
§  Avoid inheritance
§  Polymorphism
§  Method overloading
§  Overriding
§  Shadowing
§  Static and dynamic polymorphism
o   Lecture 6
§  Interfaces What when and how(Talk about access modifiers in interface)
·         Decouple
·         Contracts
·         Multiple inheritance

·         Class inherits classes
·         classes implement interfaces
§  Abstract Classes What When and How(Talk about static methods)
§  Creating objects of Interfaces and Abstract Class
§  Implementing multiple interfaces
§  Partial Class
§  Partial Method
§  Abstract vs. Partial
o   Lecture 7
§  Delegates What When
§  Multi cast delegates
§  Asynchronous Delegates
§  Events vs. Delegates
§  Generics
§  Array vs. ArrayList vs. List
§  Regex and Validation
§  Satellite Assembly
o   Lecture 8
§  Threading –
·         What is threading? Parallel programming
·         Foreground thread(Will keep on running even main application quit),Background thread
·         Thread Priority,
·         Thread pooling,
·         TPL – Multi Core Utilization and Automatic thread pooling
§  Read-only vs. constant
§  Reflection
§  Serialization
o   Lecture 9
§  Indexer
§  Working with Linq to objects
v  Asp.net
o   Lecture 10
§  What is asp.net
§  Get vs Post
§  Asp.net web forms vs MVC
§  Asp.net Compilation
o   Lecture 11
§  Asp.net request processing
§  Asp.net life cycle
o   Lecture 12
§  Types of controls in Asp.net Web Forms
§  Explore some basic controls like button,Textbox Drop Down, GridView and Listbox
§  Working with Validations
§  Working with Css
o   Lecture 13 and Lecture 14
§  StateManagement  - View State,Hidden Fields, Cookies
§  StateManagement  - Session and Application
§  Caching
o   Lecture 15
§  Creating Custom and User Control using asp.net
§  Working with Master Pages
o   Lecture 16
§  What is Ajax
§  Working with Update Panel
§  What is script Manager
o   Lecture 17
§  Hosting in IIS
§  Working with 3 Tier applications
v  Javascript and jQuery
o   Lecture 18
§  Why Javascript
§  Basic Coding using javascript
§  How javascript is different from jQuery
§  jQuery Explore some functions
§  jQuery Selectors
§  jQuery Events
v  Sql Server
o   Lecture 19
§  What is Database, Tables, Rows and Columns
§  Database Server and Management Studio
§  Create Query and Drop Query
§  Add New Column, Drop One column
§  Alter Query – Add, Drop and sp_RENAME 
o   Lecture 20
§  Data types in sql server
§  What is Allow Null(Not Null)
§  Simple Sql Queries
·         Select
·         Insert
·         Update
§  Primary Key, Unique Key, Candidate Key, Alternate Key
§  Identity Column
§  Relationships
§  Composite Key Foreign key and
o   Lecture 21 - Tuesday
§  Where, In ,between
§  Wild Card Operator
§  Aggregate functions 
Sum, Avg, Count, Max, Min
§  Delete and Truncate
§  Top, Order by
§  Is Null vs. collaese
§  Union and Union all
o   Lecture 22 - Wednesday
§  Joins in SQL Server
·         Inner
·         Left ,Right, Full Outer
·         Cross
·         Self
·         Equi Join - An equijoin is a join with a join condition containing an equality operator
o   Lecture 23 - Friday
§  Group by, having
§  Sub Queries and correlated sub queries
o   Lecture 24
§  Indexes  
·         Select performance
·         Insert Delete and Update Performance
·         Clustered vs Non Clustered
§  Stored Procedure
o   Lecture 25
§  Functions – Scalar valued, Inline and Multistate
§  Returns vs Return
§  Stored procedure vs Function
§  Exists function and sys.objects and IF
§  Select * into
§  Table Variable and Temporary tables
o   Lecture 25
§  Triggers , Inserted and Deleted Tables  
§  Views
§  Views vs StoredProedures
o   Lecture 26
§  Normalization and De-normalization
§  ACID

§  SQL Transactions