Geeks With Blogs
Deeksha Sharma May 2014 Entries
features of abstract Class
An abstract class cannot be instantiated.An abstract class contain abstract members as well as non-abstract members.An abstract class cannot be a sealed class because the sealed modifier prevents a class from being inherited and the abstract modifier requires a class to be inherited.A non-abstract class which is derived from an abstract class must include actual implementations of all the abstract members of parent abstract class.An abstract class can be inherited from a class and one or more interfaces.An ......

Posted On Friday, May 30, 2014 4:17 AM

The type 'System.Xml.XmlDictionaryReaderQuotas' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Need to add service reference first .then add this class.it will work

Posted On Thursday, May 29, 2014 10:29 AM

Http vs Https in wcf
<bindings> <basicHttpBinding> <binding name="httpBinding" > <security mode="None"/> </binding> </basicHttpBinding> </bindings>set security mode to None.Do not set binding as mexHttpsBinding. <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange... this way you can change the https to http.These are major changes ......

Posted On Wednesday, May 28, 2014 6:43 AM

Retrieving Last Updated Data's Primary key
static public int AddProductCategory(string newName, string connString) { Int32 newProdID = 0; string sql = "INSERT INTO Production.ProductCategory (Name) VALUES (@Name); " + "SELECT CAST(scope_identity() AS int)"; using (SqlConnection conn = new SqlConnection(connString)) { SqlCommand cmd = new SqlCommand(sql, conn); cmd.Parameters.Add("@Name", SqlDbType.VarChar); cmd.Parameters["@name"].Value = newName; try { conn.Open(); newProdID = (Int32)cmd.ExecuteScalar(); } catch (Exception ex) { Console.WriteLine(ex.Message); ......

Posted On Tuesday, May 20, 2014 7:15 AM

How to query from two tables and then make an object which has the both table data in Linq
object balanceSheet; public Object GetCustomerBalanceSheet(int id) { var result = (from balance in db.CustomerBalanceSheets select new { Date = balance.Date, Amount = balance.BalanceData }).ToList(); if (result.Count() == 0) { IQueryable<CustomerBalan... balanceSheetwithPayments = (from payment in db.CustomerPayments where payment.PaymentDate < DateTime.Now select new CustomerBalanceSheetViewModel { Amount = payment.PaymentAmount, Date = payment.PaymentDate, Status="Payment" ......

Posted On Thursday, May 8, 2014 10:33 AM

Copyright © Deeksha Sharma | Powered by: GeeksWithBlogs.net