11.1.18 Videos
Entity Framework Codefirst Approach
Posted in Uncategorized
Posted in Success Hacks
Tagged Consistency, Gain, motivation, Pain, Patience, Perseverance
19.11.17 Videos:
Relationships:
Inheritance, Association, Aggregation and Composition
These are except that inheritance
From the slide:
Association:
Relation between students and teacher. Both are independent.
Manager has a swipe card to enter the company premises Association
Inheritance:
A manager is a type of Employee. Employee is a parent of manager
Aggregation:
These kind of relationship is called Aggregations. It represents a Has-A relationship.
public class Manager{
//aggregation relation
public List<Worker> workers=new List<Worker>();
//here worker is the child object and manager is the parent object
}
public class Worker{
public string WorkerName=” “;
Worker object=new Objects;
}
Composition(Death Relationships)
StringBuilder:
It is very useful while string can make complexity in heap but StringBuilder helps to reduce it by modifed string.
System.Text.StringBuilder class can be used and it comes from System.Text namespace
StringBuilder is mutable
StringBuilder performs faster than string when appending multiple string values
StringBuilder sb=new StringBuilder();
Use append method to add or append strings with StringBuilder
Use ToString() method to get the string from StringBuilder
Relationships Code and Videos:
I have completed the program may be I need to do it / practice it letter with heart. 🙂
Posted in LICT
When we work with Collections in C# we need to iterate the items of collections. One way fo doing is this foreach loop.
The class should implenet IEnumerable interface. The IEnumerable interface also inehirts from IEnumerator interface/
codes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IEnumerableandIEnumerator { class Player { public string Name { get; set; } public int Age { get; set; } public Player(string name, int age) { Name = name; Age = age; } } class Team:IEnumerable { private Player[] playerArray=new Player[4]; //aggregated class public Team() { playerArray[0] = new Player("Virat", 28); playerArray[1] = new Player("Dhoni", 35); playerArray[2] = new Player("Rohit", 29); playerArray[3]= new Player("Yuvraj",34); } public IEnumerator GetEnumerator() { return playerArray.GetEnumerator(); } } class Program { static void Main(string[] args) { //string[] PlayerArray = {"Virat", "Rohit", "Dhoni"}; //foreach (var items in PlayerArray) //{ // Console.WriteLine("Player is {0}",items); //} Team obj=new Team(); foreach (Player iteemPlayer in obj) { Console.WriteLine("Name is {0} and Age is {1}",iteemPlayer.Name,iteemPlayer.Age); } Console.ReadLine(); } } } |
Posted in .NET
16/11/2017 vids
ExtensionMethod
Object Initializer
CollectionInitializer
QueryExpression
– It contains three clauses
from, where, orderby
Linq
IEnumerable
Diffrenet Datasource:
Array, Database, XML,LIST/Collection also datasource, File Concept also data source
Data we can able to store in known as data source
Data source: Where the data is available
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
using System; using System.Collections.Generic; using System.Linq; namespace linqSample { class Program { static void Main(string[] args) { int[] num=new int[5]{45, 78,45,34,2}; IEnumerable<int> res=from N in num where N>40 orderby N select N; foreach (var item in res) { Console.WriteLine(res); } Console.ReadKey(); } } } |
Linq-Language Integrated Query
What is strongly typed ?
Strongly typed means:
Which show error immediately at a time of declaration that is called strongly typed. It is also called compile time error.
Weakly typed means:
Which show error in runtime is called weakly typed like delegate.It is also known as loosely type.
Intellisense and Strongly typed is supproted in LINQ concept.
LINQ enabled data sources is very very important for interview:
LINQ to Objects : It means with array, arralist, etc.
LINQ to Datasets: It’s connected with ADO.NET
LINQ to SQL: It’s connected to SQL
LINQ to Entities: It’s connected to other data base like oracle or mysql
LINQ to XML: It’s connected to XML files
IQueryable
Where IQueryable is inherited from IEnumerable
IEnumerable
There are two expression in LINQ QueryExpression and methodExpression
Differed Execution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
using System; using System.Collections.Generic; using System.Linq; namespace linqSample { class Program { static void Main(string[] args) { int[] num=new int[5]{45,78,45,34,2}; IEnumerable<int> res=from N in num where N>40 orderby N descending select N; foreach (var item in res) { Console.WriteLine(item); } Console.ReadKey(); } } } |
Forced Execution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
using System; using System.Collections.Generic; using System.Linq; namespace linqSample { class Program { static void Main(string[] args) { int[] num=new int[5]{45,78,45,34,2}; IEnumerable<int> res=(from N in num where N>40 orderby N descending select N).ToArray(); foreach (var item in res) { Console.WriteLine(item); } Console.ReadKey(); } } } |
Immediate:
Posted in LICT
এপ্লিকেন্টকে এত নিয়ম মানতে হবে, তা আপনারাও তো জব পোস্ট করার সময় গ্রুপের নিয়মগুলো পড়ে জব পোস্ট করা উচিত। অন্তত কোম্পানীটার নাম তো দিবেন। তাহলে গুগল সার্চ করে অন্তত দেখতে পারতাম কোম্পানীর অবস্থা কেমন, কবে শুরু করেছে, কিসের কিসের উপর কাজ করে, এদের সাইটে ভিজিটর কেমন। অনলাইনে এদের উপস্থিতি কেমন।CEO কে, ওনার প্রোফাইল ভেল্যু কেমন, কয়জন এমপ্লি কাজ করে ঐখানে। গ্লাসডোরে ওদের প্রোফাইল আছে কিনা। ১৫ হাজারে যে ঢুকবো, ঠিকমত সেলারী দিতে পারবে তো ! একটা কোম্পানীর যেমন অধিকার আছে সবকিছু অ্যানালাসিস করে কাউকে নেয়ার, ঠিক তেমনি এপ্লিকেন্টেরও সব কিছু অ্যানালাইসিস করে অ্যাপ্লাই করার সুযোগ থাকা উচিত।
Posted in Uncategorized
Posted in Uncategorized