Sharing the goodness…
Beth Massi is a Senior Program Manager on the Visual Studio team at Microsoft and a community champion for .NET developers. Learn more about Beth.
More videos »
Download the sample here.
Read this article series to get started with the most important concepts you need to build any LightSwitch HTML business application:
Visit the LightSwitch Developer Center for more tutorials and get started learning! For LightSwitch questions and troubleshooting please visit the LightSwitch Forums.
Have fun building your first apps!
This project is tied to a local host to run in the browser which points to my question...what if you developed on a local machine, but wanted to later connect to a server like SQL or MySQL? I'm trying to see how versatile this app is when it comes to connecting a finished product to a separate backend database where the fields are predefined correctly.
If I'm not being specific enough, please let me know and I will revise my question. Thank you in advance!
This tutorial assumes you will be using a SQL Server database when you deploy the application. During development, if you design your entities in the data designer, LightSwitch uses your LocalDB SQL database (that is installed with Visual Studio) while debugging. However, you can use any version of SQL server (2008 express, which is free, or higher versions) to deploy, including SQL Azure.
If you want to use a database that already exists, then you need to select "Attach to External Data" instead of choosing "Add New Table". But that would mean that you need to maintain that database separately from your application. Many people prefer this even if it is a SQL database especially if the database schema is complex.
I don't have much experience with MySQL, but here is a video from one of our MVPs on how to get it to work with LightSwitch. www.youtube.com/watch
For more information on deployment see:
On premises: msdn.microsoft.com/.../gg481778(v=vs.110).aspx
In Azure: blogs.msdn.com/.../easily-deploy-your-lightswitch-apps-to-azure-websites-in-3-minutes.aspx (same steps for an HTML client, except you don't need to worry about signing the XAP)
I'm a little confused, try to include a method best search to a client page (HTML) where they can search for separate phrases, as an example if I search "carlos rojas" and in the field of BD this as "rojas carlos" normal search not found, that in VB.net I resolve simply switch phrases in lightswitch have to do an extended consultation, but I did not know how to link it to the page where I want to return the query, here the code fragment I did in an extended search by code on the server:
Private Sub BusquedaAvanzada_PreprocessQuery(StrBuscar As String, ByRef query As System.Linq.IQueryable(Of LightSwitchApplication.ProductosItem))
Dim BuscarInvertido As String = ""
Dim Matriz() As String
StrBuscar = Replace(StrBuscar, " ", "%")
StrBuscar = "%" & StrBuscar & "%"
Matriz = StrBuscar.Split("%")
For i = Matriz.Length - 1 To 0 Step -1
BuscarInvertido = BuscarInvertido & "%" & Matriz(i)
BuscarInvertido = BuscarInvertido & "%"
query = From Productos In query
Where Productos.DESCRIPCION Like StrBuscar Or BuscarInvertido
Is it too much trouble you can help me with this question?
Thanks and greetings from Mexico