domainservices

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

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

Determine current domain controller programmatically

无人久伴 提交于 2019-12-18 04:54:32
问题 I need to query current domain controller, probably primary to change user password. (P)DC name should be fully qualified, i.e. DC=pdc,DC=example,DC=com (how to properly name such notation?) How can it be done using C#? 回答1: To retrieve the information when the DomainController exists in a Domain in which your machine doesn't belong, you need something more. DirectoryContext domainContext = new DirectoryContext(DirectoryContextType.Domain, "targetDomainName", "validUserInDomain",

Is it possible to join a local windows machine (on premises) to a Windows Server VM that is hosted on Azure Cloud?

徘徊边缘 提交于 2019-12-13 03:58:13
问题 I am setting up a Windows Server VM on Azure cloud and configure Active Directory Domain Services and Group Policy Objects. I am trying to join a local computer (on premise) to that Server and to apply the group policy that I configured on Windows Server VM. Would this be possible, or do I really need a on premises active directory server to join a local computer ? 回答1: It's possible, you can deploy ADDS server role, join domains and many other things on Azure as what you can do on-premise.

How to insert entity over WCF-RIA-Services JSON endpoint

浪尽此生 提交于 2019-12-12 03:22:43
问题 My WCF-RIA DomainService has an insert method that looks like this: public void InsertWidget(WidgetDef widgetDef) class WidgetDef { [Key] int widgetID; string title; int x; int x; // there are more properties, but I think you get the idea... } To access this through the JSON endpoint, I think I need to POST a changeset to the url: [serverURL][namespace]WidgetService.svc/json/SubmitChanges. I'm pretty sure I got the URL correct, because my request reaches the WidgetService.Initialize method,

How to store entities context query object into generic list?

为君一笑 提交于 2019-12-12 03:03:51
问题 In my last question, i successfully to dump the data into combo box with solution from Leo but now, i want to get everything of specific user and store into generic list. i tried with this code but it's not working. May i know is there something wrong with my code ? var contexti = new OrganizationContext(); //contexti.Load(contexti.GetAdminPassQuery(userName), LoadInfo, null); EntityQuery query = contexti.GetAdminPassQuery(userName); contexti.Load<tblAdmin>(query).Completed += (sender, args)

Persistence encapsulated via the domain, or persistence via the Repository?

房东的猫 提交于 2019-12-06 14:40:49
问题 If my Domain Model is not supposed to know/care about the Repository, then how does some behaviour like .UpdateOrder(...) , that encapsulates a CRUD-Update, interface with the Repository? Through a Domain Service? Ok, then my Repository has an effective CRUD-Update that's used in conjunction with my .UpdateOrder(...) . That's fine. But i don't want someone to use the Update method on the Repository, i want them to go through the behaviour on the Entity (use UpdateOrder() instead). I'd prefer

Persistence encapsulated via the domain, or persistence via the Repository?

送分小仙女□ 提交于 2019-12-04 19:58:14
If my Domain Model is not supposed to know/care about the Repository, then how does some behaviour like .UpdateOrder(...) , that encapsulates a CRUD-Update, interface with the Repository? Through a Domain Service? Ok, then my Repository has an effective CRUD-Update that's used in conjunction with my .UpdateOrder(...) . That's fine. But i don't want someone to use the Update method on the Repository, i want them to go through the behaviour on the Entity (use UpdateOrder() instead). I'd prefer that in likeness to the way my Domain Model satisfies invariants - by it's design (private set

Determine current domain controller programmatically

耗尽温柔 提交于 2019-11-29 07:05:10
I need to query current domain controller, probably primary to change user password. (P)DC name should be fully qualified, i.e. DC=pdc,DC=example,DC=com (how to properly name such notation?) How can it be done using C#? To retrieve the information when the DomainController exists in a Domain in which your machine doesn't belong, you need something more. DirectoryContext domainContext = new DirectoryContext(DirectoryContextType.Domain, "targetDomainName", "validUserInDomain", "validUserPassword"); var domain = System.DirectoryServices.ActiveDirectory.Domain.GetDomain(domainContext); var