visual-studio-lightswitch

Change Lightswitch internal database to external

北城以北 提交于 2019-12-24 19:30:02
问题 I have been developing an application in Visual Studio Lightswitch (Silverlight client in VS2010 SP1 if it makes any difference), and so far have done all the database development in the Lightswitch designer. I now want to use an external database, but don't want to recreate the whole app, or even just the screens. I have scripted the database, and have created a copy in SQL Server, but can't find out how to get Lightswitch to use this external database without starting the whole thing again.

Adding static image to Lightswitch HTML 2013 Browse Screen

北城余情 提交于 2019-12-24 16:13:41
问题 In my case, I have color coded some tiles in the HTML client and I want to add a simple color code key. I have the PNG file I want to use. I do not require the ability to upload or change the image. This link seems to achieve what I am looking for, but I am not sure where to implement. Does all of this code go into the PostRender of the Image Control I created? Add image to lightswitch using local property and file location Here is what the PostRender of the simple Image data item I created

Access Variables set in Common Project From Server Project in Lightswitch

拥有回忆 提交于 2019-12-24 08:55:47
问题 So I have redone some of the code to the previous question, however the same underlying issue remains. What i am trying to do is this: When my lightswitch application launch through Application.cs i am using a method Application_LoggedIn() to call a function in my Common Project to get all the location a user has access to (this data is stored in a table). Client Project - Application.cs partial void Application_LoggedIn() { Secure.Membership aa = new Membership(); aa.membership(); } Common

Missing references in LightSwitch Beta 1 autogen code

馋奶兔 提交于 2019-12-24 00:36:31
问题 I'm trying out the new LightSwitch beta 1 and getting the following error when I try to build. Not much special - I tried to create a new screen based off of data sources from an existing database. Of course, there's no place to add references. Error 5 The type or namespace name 'DomainServices' does not exist in the namespace 'System.ServiceModel' (are you missing an assembly reference?) [...]DataClientImplementation.cs 19 37 ClientGenerated Anyone else playing with this new stuff? If

Root element is missing when trying to Publish

久未见 提交于 2019-12-23 21:12:10
问题 It has been a while since I've published my app to Azure. During that time frame, I've upgraded my system from 32-bit to 64-bit meaning a fresh install of Windows and Visual Studio. And Visual Studio Update 3 came out and was applied. When I went to publish an update today, I received the following: The following exception was thrown trying to publish: Root element is missing. My web.config file looks fine so I don't think it's this issue. The app works fine in debug mode so I don't think it

In LightSwitch, how to fill choice list of query parameter from a table

谁说我不能喝 提交于 2019-12-23 19:20:03
问题 In VS LightSwitch, queries can have parameters. When creating a screen, the query parameters are shown on the screen. A choice list can be defined, in which case the field appears as a drop-down-list on the screen. Instead of defining a static choice list, how can I read the choice list from a table? 回答1: I've found the answer to my question here: http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/c69f23bd-4ccb-4bbf-847f-dc01e0baef07 No, a choice list is a static list of data.

LightSwitch - bulk-loading all requests into one using a domain service

别等时光非礼了梦想. 提交于 2019-12-23 04:23:57
问题 I need to group some data from a SQL Server database and since LightSwitch doesn't support that out-of-the-box I use a Domain Service according to Eric Erhardt's guide. However my table contains several foreign keys and of course I want the correct related data to be shown in the table (just doing like in the guide will only make the key values show). I solved this by adding a Relationship to my newly created Entity like this: And my Domain Service class looks like this: public class

Getting additional files in LightSwitch

拜拜、爱过 提交于 2019-12-23 01:43:09
问题 I want to add additional files (mostly .xlsx and .docx ) to a LightSwitch application and use this files in the application, for example as a filestream. What is the best way/practice to do this? So far I can add files to the client-project (under the file-view). This file then shows in the bin\debug\bin\Server directory when I make a debug-build or publish the application. So now comes the tricky part. How do I get a file stream of this files? In which directory is it installed? 回答1: After

How do I get MS LightSwitch to recognize my View?

陌路散爱 提交于 2019-12-22 13:51:39
问题 I've created a View from a table in another database. I have dbo rights to the databases so viewing and updating is not a problem. This particular View did not have an "id" column. So I added one to the View by using ROW_NUMBER. Now I had a problem with a table, in the same database, not showing up in LightSwitch but that was solved by changing the id column to be NOT NULL. I haven't done any real manipulation in LightSwitch. I'm still in the Import Your Data Source stage (ie. very beginning)

Lightswitch is slow, ADO.NET Entity Framework/Domain Service/WCF RIA Service

亡梦爱人 提交于 2019-12-21 21:26:35
问题 I'm developing an Lighswitch application in VS2012 with an external SQL Server 2008. I'm using a WCF RIA Service to fetch my data, using these techniques: http://www.c-sharpcorner.com/UploadFile/raj1979/how-to-use-wcf-ria-service-in-lightswitch-2012/. My main table contains some columns with static data and about 5 columns with foreign keys. The static data columns loads instant but all the foreign properties takes 3-5 secs to load on a screen with ~100 rows. This is not acceptable.. The