Windows8Index

Index of Windows 8 and Metro App Programming Information

Pages

  • Home
  • Topic Index

Wednesday, July 25, 2012

Getting Started with Oracle Data Provider for .NET (C# Version)


was looking for Oracle C# tutorial and found the official one: 

Time to Complete
Approximately 30 minutes

Overview

In addition to basic Oracle client connectivity software, .NET applications require the use of what is known as a managed data provider (where "managed" refers to code managed by the .NET framework). The data provider is the layer between the .NET application code and the Oracle client connectivity software.

The Oracle Data Provider for .NET (ODP.NET) is Oracle's high performance ADO.NET 2.0 compliant data provider that exposes a complete set of Oracle specific features and tuning options including support for Real Application Clusters, XML DB, and advanced security. It is available for free download from the Oracle Technology Network website.

When ODP.NET and any required Oracle client connectivity software is installed, application development using Visual Studio can begin. It is a good idea to confirm client connectivity before starting development. If you can connect to Oracle using SQL*Plus on the same machine as Visual Studio, then you know that your Oracle client-side software is properly installed and configured.


complet article continues here
Posted by BlArthurHu at 11:04 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: .net, c#, database, oracle

Why Waterfall Gurantees Wrong Solution: Project Management


I think this applies for IT jobs where the customers really don't have a good idea of what they want, it doesn't apply to things like compilers or cell phones where the functionality is usually based 95% of what the last version or competitor was. 


It is still good to have a waterfall to have some sort of plan in place that puts some bounds of what is to be done and how it is going to be done. I have seen too many projects use Agile as an excuse to not have a waterfall process or plan at all. 


A Better Project Model than the "Waterfall"

by Jeff Gothelf  |   8:22 AM July 6, 2012
  • Comments (302)
  •        
This happens every day: A "solution" is handed to a team to build. The team determines the scope of the work, develops a project plan and promises a set of features by a specific date. It is assumed that these features will solve some business problem or meet an executive directive because someone with a paygrade higher than the execution team has blessed the work. And with this set of features and project plan the waterfall cycle begins again.
The team begins to define the work in painstaking detail, outlining every possible scenario, use case, back-end integration point, and business rule. The design team takes it from there, visually articulating the placement of every pixel and the logic behind every input field, check box, and submit button. Soon the software engineers will get their turn at bat followed closely by their compatriots in quality assurance and then, finally, after the t-shirts have been printed and the launch parties have died down, the company's customers will get their first chance to use the new product.
Despite the confidence inspired by all of this upfront planning and design, the only guaranteed thing to come out at the end of this waterfall process is the wrong solution. It's not that the project sponsor chose an inadequate feature set or that the system's user experience was poor. The team delivered the wrong solution because the project was based on unvalidated assumptions. These assumptions were presented as requirements and as such were not positioned as something that could be disproved or even questioned.
article continues here
Posted by BlArthurHu at 11:02 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, June 17, 2012

.NET 4 Entity Framework Tutorials



  1. Here is what Google returns: 

    Getting Started (Entity Framework)

    msdn.microsoft.com/en-us/library/bb386876.aspx
    NET Entity Framework supports data-centric applications and services, and ... by explaining the underlying technologies in the context of the Quickstart tutorial.
    Generating Models and ... - Quickstart - Entity Framework Overview
  2. Quickstart

    msdn.microsoft.com/en-us/library/bb399182.aspx
    ... with the ADO.NET Entity Framework. ... NET Framework, but who are new to theEntity Framework. ... Estimated time to complete this tutorial: 30 minutes.
  3. Entity Framework : Official Microsoft Site

    www.asp.net/entity-framework
    NET Entity Framework is an Object/Relational Mapping (ORM) framework that enables... Using the Entity Framework, developers issue queries using LINQ, then ...
  4. ADO.NET Entity Framework Tutorial and Basics

    www.codeguru.com/.../ADONET-Entity-Framework-Tutorial-and-Ba...
    Sep 3, 2008 – Discover an ADO.NET Entity Framework tutorial covering basic data operations for applications, including LINQ To Entities, Method ...
  5. Entity Framework Tutorial | Packt Publishing Technical & IT Book ...

    www.packtpub.com › Books
    Learn to build a better data access layer with the ADO.NET Entity Framework and ADO.NET Data Services.
  6. Amazon.com: Entity Framework Tutorial (9781847195227): Joydip ...

    www.amazon.com › ... › Programming › Graphics & Multimedia
     Rating: 1.8 - 5 reviews - $31.84 - In stock
    Joydip Kanjilal. Joydip Kanjilal is a Microsoft MVP in ASP.NET. He has over 12 years of industry experience in IT with more than 6 years in Microsoft .NET and its ...
  7. Tutorial: ADO.NET Entity Framework (with Source Code)

    adoeftutorial.codeplex.com/
    Sep 15, 2010 – Tutorial: ADO.NET Entity Framework. This Tutorial provides information on how to configure and use the ADO.NET Entity Framewok in your ...
  8. Entity Framework Tutorials - ASP.NET - ADO.NET Blog - Site Home ...

    blogs.msdn.com › ADO.NET Blog
    Jan 18, 2011 – The ASP.NET team recently produced a great set of tutorials on creating web applications with the Entity Framework. They guide you through ...
  9. ADO.NET Entity Framework tutorials - Stack Overflow

    stackoverflow.com/questions/.../ado-net-entity-framework-tutorials
    5 answers - Sep 15, 2008
    Does anyone know of any good tutorials on ADO.NET Entity ... Microsoft offers .NET 3.5 Enhancements Training Kit it contains documentation and ...
  10. dotConnect for MySQL Entity Framework Tutorial

    www.devart.com/dotconnect/mysql/articles/tutorial_ef.html
    This tutorial guides you through the process of creating a simple application powered by ADO.NET Entity Framework using Visual Studio 2010. In less than 5 ...

Here are the common steps to creating an Entity framework application
from http://tofannayak.wordpress.com/2011/02/18/entity-framework-tutorial/

  • Create the database by hand or using a sql script
  • Create a windows form application Solution Explorer with a listbox that will be bound to a datasource. 
  • Generate model from database: Solution Explorer, Add, New Item, ADO.NET entity data Model, Add, (Entity Data Model Wizard) Generate from Database Next
  • pick datasource and dataprovider
  • choose database objects
  • Save entity connection settings ... ThisEntities (This sets up the name of the context class  to query)
  • produces model-something.edmx
// Create context for queries
ThisEntities context = new ThisEntities();

// query gets back list of entity objects using LINQ
var query = from it in context.Company
            orderby it.CompanyID
            select it;

// now you have collection of objects
foreach (Company comp in query)
  Console.WriteLine("{0} | {1} | {2}", comp.CompanyID, comp.CompanyName, comp.Country);
 
.Include gets information from another table
CrmDemoEntities context = new CrmDemoEntities();

var query = from it in context.Products.Include("ProductCategories")
            orderby it.ProductCategories.CategoryName, it.ProductName
            select it;

foreach (Products product in query)
  Console.WriteLine("{0} | {1} | {2}",
    product.ProductCategories.CategoryName, product.ProductName, product.Price);
 

Posted by BlArthurHu at 7:58 PM 1 comment:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Tuesday, June 12, 2012

What is a C# Attribute?

What is a C# Attribute? 

Real short answer: It is a way of tacking declarative information into C# code (as opposed to something that actually generates code that does something like assigning a variable). You can use reflection to look up attributes. You can use system defined declarations or your own. Syntax uses square brackets such as [System.Attribute]

Common attributes:

  1. [System.Serializable]
    [Obsolete("Don't use Old method, use New method", true)]
    see main article: What is a C# Attribute? 
    
    
    
    

    Attributes (C#)

    msdn.microsoft.com/en-us/library/z0w1kczw(v=vs.80).aspx


    Attributes provide a powerful method of associating declarative information with C# code (types, methods, properties, and so forth). Once associated with a program entity, the attribute can be queried at run time using a technique calledReflection.

    Attributes exist in two forms: attributes that are defined in the Common Language Runtime's base class library and custom attributes that you can create, to add extra information to your code. This information can later be retrieved programmatically.

    In this example, the attribute System.Reflection.TypeAttributes.Serializable is used to apply a specific characteristic to a class:
    C#
    [System.Serializable]
    public class SampleClass
    {
        // Objects of this type can be serialized.
    }
    
    

    Attribute Overview

    Attributes have the following properties:
    • Attributes add metadata to your program. Metadata is information embedded in your program such as compiler instructions or descriptions of data.
    • Your program can examine its own metadata using Reflection. See Accessing Attributes With Reflection.
    • Attributes are commonly used when interacting with COM.

    Related Sections

  2. Attributes Tutorial (C#)

    msdn.microsoft.com/en-us/library/aa288454(v=vs.71).aspx
    Attributes provide a powerful method of associating declarative information with C# code (types, methods, properties, and so forth). Once associated with a ...
  3. Introduction to Attributes (C#)

    msdn.microsoft.com/en-us/library/aa288059(v=vs.71).aspx
    C# provides a mechanism for defining declarative tags, called attributes, which you ...This section provides a general introduction to attributes in C#; for more ...
  4. Attributes in C# - CodeProject

    [This has a pretty good intro to how to create your own user-built attributes]]
    www.codeproject.com › Languages › C# › Beginners

     Rating: 4.8 - 137 reviews
    Sep 24, 2002 – In this tutorial we will see how we can create and attach attributes to various program entities, and how we can retrieve attribute information in a ...


    1. Developing Custom Attributes

      Now we will see how we can develop our own attributes. Here is a small recipe to create our own attributes.
      Derive our attribute class from System.Attribute class as stated in C# language specification (A class that derives from the abstract class System.Attribute, whether directly or indirectly, is an attribute class. The declaration of an attribute class defines a new kind of attribute that can be placed on a declaration) and we are done.
       Collapse | Copy Code
      using System;
      public class HelpAttribute : Attribute
      {
      }
      
      Believe me or not we have just created a custom attribute. We can decorate our class with it as we did with obsolete attribute.
       Collapse | Copy Code
      [Help()]
      public class AnyClass
      {
      }
      
      Note: it is a convention to use the word Attribute as a suffix in attribute class names. However, when we attach the attribute to a program entity, we are free not to include the Attribute suffix. The compiler first searches the attribute in System.Attribute derived classes. If no class is found, the compiler will add the word Attribute to the specified attribute name and search for it.
      But this attribute does nothing useful so far. To make it little useful let add something more in it.
       Collapse | Copy Code
      using System;
      public class HelpAttribute : Attribute
      {
          public HelpAttribute(String Descrition_in)
          {
              this.description = Description_in;
          }
          protected String description;
          public String Description 
          {
              get 
              {
                  return this.description;
                       
              }            
          }    
      }
      [Help("this is a do-nothing class")]
      public class AnyClass
      {
      }
      
      In above example we have added a property to our attribute class which we will query at runtime in last section.

      Defining or Controlling Usage of Our Attribute

      AttributeUsage class is another pre-defined class that will help us in controlling the usage of our custom attributes. That is, we can define attributes of our own attribute class.
      It describes how a custom attribute class can be used.
      AttributeUsage has three properties which we can set while placing it on our custom attribute. The first property is:

      ValidOn

      Through this property, we can define the program entities on which our custom attribute can be placed. The set of all possible program entities on which an attribute can be placed is listed in the AttributeTargetsenumerator. We can combine several AttributeTargets values using a bitwise OR operation.

      AllowMultiple

      This property marks whether our custom attribute can be placed more than once on the same program entity.

      Inherited

      We can control the inheritance rules of our attribute using this property. This property marks whether our attribute will be inherited by the class derived from the class on which we have placed it.
      Let's do something practical. We will place AttributeUsage attribute on own Help attribute and control the usage of our attribute with the help of it.
       Collapse | Copy Code
      using System;
      [AttributeUsage(AttributeTargets.Class), AllowMultiple = false, 
       Inherited = false ]
      public class HelpAttribute : Attribute
      {
          public HelpAttribute(String Description_in)
          {
              this.description = Description_in;
          }
          protected String description;
          public String Description
          {
              get 
              {
                  return this.description;
              }            
          }    
      }
      
      First look at AttributeTargets.Class. It states that Help attribute can be placed on a class only. This implies that following code will result in an error:
       Collapse | Copy Code
      AnyClass.cs: Attribute 'Help' is not valid on this declaration type. 
      It is valid on 'class' declarations only.
      Now try to put in on method
       Collapse | Copy Code
      [Help("this is a do-nothing class")]
      public class AnyClass
      {
          [Help("this is a do-nothing method")]    //error
          public void AnyMethod()
          {
          }
      } 
    <continued at link above>
  5. Quick Overview of C# Attribute Programming - CodeProject

    www.codeproject.com › Languages › C# › Attributes
     Rating: 4.6 - 5 reviews

    Programming C#: Chapter 18: Attributes and Reflection

  6. oreilly.com/catalog/progcsharp/chapter/ch18.html
    Perhaps the attribute you are most likely to use in your everyday C# programming (if you are not interacting with COM) is [Serializable] . As you'll see in Chapter ...
  7. C# Attribute Examples

    www.dotnetperls.com/attribute
    This C# tutorial shows how to use attributes. It uses Obsolete and AttributeUsage.
  8. .net - Most Useful Attributes in C# - Stack Overflow

    stackoverflow.com/questions/.../most-useful-attributes-in-c-sharp
    30 answers
    I know that attributes are extremely useful. There are some predefined ones ... [DebuggerDisplay] can be really helpful to quickly see customized output of a Type ...
  9. Lesson 16: Using Attributes - C# Station

    www.csharp-station.com/Tutorial/CSharp/lesson16
    This lesson explains how to use C# attributes. Our objectives are as follows: Understand what attributes are and why they're used; Apply various attributes with ...
  10. Elegant Code » Marker Interfaces and C# Attributes

    elegantcode.com/2008/07/30/marker-interfaces-and-c-attributes/
    Jul 30, 2008 – The marker interface is an interface that is empty. It does not implement any properties nor methods. It is used to mark the capability of a class ...
Posted by BlArthurHu at 8:45 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Contents and Links

  • Topic Index Contents

Total Pageviews

Popular Posts

  • WINJS.promise and .then pattern
    The whole promise/async programming aspect of Windows 8 isn't very well documented, so this is what I've dredge up: see http://m...
  • Know The 3 Model-View-Whatever UI Design Patterns MVC MVP MVVM!
    You Need To Know These 3 UI Design Patterns MVC MVP MVVM!   Model-view-controller  MVC  The  model–view–controller  frame...
  • Windows 8 Blog and Developer Preview Forums
    Some other great jump off points          Windows 8 Blog  http://blogs.msdn.com/b/b8/ ·            MSDN for developer information  h...
  • Windows 8 javascript: Flyout Quick Start
    see  http://msdn.microsoft.com/en-us/library/windows/apps/hh465354.aspx Create a flyout In this example, when the user presses the B...
  • Windows Communcation Foundation Bindings (WCF) Web Services Cheat Sheet
    Windows Communcation Foundation Bindings (WCF) Web Services Cheat Sheet BasicHttpBinding - basic compatibility Basic SOAP 1.1 A bi...
  • India's HCL 1980 Desktop Micro Computer
    HCL was India's entry into the micro computer indusry. In 1980, the came up with this16-bit bit sliced microcomputer just before the ...
  • Asynchronous Programming Javascript Promises Windows 8
    What is "then ()"? ----- kevingadd 125 days ago | link It's a method with a signature like this: promise.then...
  • What is a C# Attribute?
    What is a C# Attribute?  Real short answer: It is a way of tacking declarative information into C# code (as opposed to something that act...
  • CodeProject: Flappy Bird in 100 lines of Jquery Javascript
    shared from open source: http://www.codeproject.com/Articles/778727/Build-Flappy-Bird-with-jQuery-and-lines-of-Javascr CodeProject: Flap...
  • ARM First Challenge to x86 Processor Dominance
    ARM First Challenge to x86 Processor Dominance x86 has beat off every attempt to replace it - except the ARM in phones and tablets Fail...

Followers

Blog Archive

  • ►  2019 (6)
    • ►  May (3)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2018 (1)
    • ►  March (1)
  • ►  2017 (15)
    • ►  July (1)
    • ►  June (1)
    • ►  May (3)
    • ►  April (2)
    • ►  March (4)
    • ►  February (1)
    • ►  January (3)
  • ►  2016 (18)
    • ►  December (3)
    • ►  November (2)
    • ►  October (2)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  April (1)
    • ►  March (7)
  • ►  2015 (19)
    • ►  July (1)
    • ►  April (2)
    • ►  March (5)
    • ►  February (4)
    • ►  January (7)
  • ►  2014 (19)
    • ►  August (1)
    • ►  June (1)
    • ►  May (4)
    • ►  March (7)
    • ►  February (5)
    • ►  January (1)
  • ►  2013 (12)
    • ►  November (1)
    • ►  October (1)
    • ►  September (2)
    • ►  August (1)
    • ►  July (1)
    • ►  June (5)
    • ►  March (1)
  • ▼  2012 (17)
    • ▼  July (2)
      • Getting Started with Oracle Data Provider for .NET...
      • Why Waterfall Gurantees Wrong Solution: Project Ma...
    • ►  June (6)
      • .NET 4 Entity Framework Tutorials
      • What is a C# Attribute?
    • ►  April (1)
    • ►  February (1)
    • ►  January (7)
  • ►  2011 (9)
    • ►  December (9)

About Me

My photo
BlArthurHu
View my complete profile
Simple theme. Powered by Blogger.