Here is a good link from MSDN that explains how to deploy database changes to an exsisting database.
A fast way to get a list you can copy into a code file with all the fields in a table.
select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = ‘tablename’
Entity Framework (EF) does not support lazy loading. You must explicitly load the comments advising the EF what to include.
Using ctx as new MyDataContext()
lvComments.DataSource = ctx.Entity.Include(“SomethingToInclude”).First().Comments
lvComments.Databind()
End Using
Or
Using ctx as new MyDataContext()
Dim MyListOfSomething as List(of ListOfSomething) = ctx.ListOfSomething
MyListOfSomething.SomethingToLoad.Load()
lvComments.DataSource = MyListOfSomething.Comments
lvComments.DataBind()
End Using
The problem: no .csproj file in websites
The solution: http://www.dotnetsizzler.com/post/Using-MS-Build-in-ASPNET-Website.aspx Add a proj file to the website, and set up the build to use it. http://en.csharp-online.net/MSBuild:_By_Example%E2%80%94Dealing_with_MSBuild_Errors
Here are a few ways to get the value of an asp textbox
- document.getElementById(‘<%=Test.ClientID%>’).value
- <%=txtMyTextBox.ClientID%>
- Response.Redirect(“Form2.aspx?name=” + txtName.Text + “&num=” + txtStNum.Text );
Pex automatically generates test from Visual Studio code editor. It tries interesting sets of input and output of a method. This provide a high level of test coverage automatically. Currently it is a Visual Studio add in for testing .NET Framework Applications
Moles supports Unit Testing by isolation with detours and stubs.
http://research.microsoft.com/en-us/projects/pex/
You can try it out online with no install at: http://www.pexforfun.com/
String.Join(“,”,Array.ConvertAll(list.ToArray(),element => element.ToString()));
Website Application Testing Procedures
How to test software
1) Functionality Testing
Links, Forms, Getting and Setting Data, Validating
2) Usability testing
Navigation, Content
3) Interface testing
Error Handling, Connections
4) Compatibility testing
Cross Browser, Printer, Mobile
5) Performance testing
Load Testing, Stress Testing
6) Security testing
Spam, Hacking, URLs, Scripting attacks
For entity framework, you should use ObjectContext.AddObject() instead of Linq to SQL DataContext.TableName.Add()