Choosing Persistence Engine - Criterion And Projection?

Jan 24, 2011

I touched on this last year sometime, but I was frustrated at the time and might not have made much sense. I'd like to try again to see if I can get some constructive advice. I am having an issue in choosing a persistence engine. My first choice is FluentNHibernate / NHibernate. However, I am having severe difficulties with their criterion and projection mechanisms. Searching for examples is difficult and when I do find something, I really don't understand what I'm looking at. After a year of trying to bring this together, it still eludes me. I know I could just ask here for help with certain things, but you guys have more things to do than sit and teach me nhibernate criterion. My second choice is Entity Framework 4. I am leaving the CTP 5 off the list for now as there is a major bug in how self-referencing tables are handled at the moment. Now, I have two sub-choices here. The first involves using code first by turning off code generation in the designer and place my enities and edmx in separate libraries (.Domain and .Persistence.Mapping) but this involves a bit of extra work. Then again, for simplicities sake, I could just dump the edmx designer right in the domain library. But this means having the mapping info in the domain library. Not ideal, but it'd work. I still retain the ability to map collections, references and properties as protected or private, and add logic-checking accessors to the entities, as well as setting a protected and public constructor. The entities would still be strong, valid business entities. With these points in mind, what direction should I head?

View 11 Replies


Similar Messages:

SQL Server :: Specify A Criterion For Current Timestamp?

Mar 9, 2011

I have a column in my table that is named 'startDateTime' and 'endDateTime'. I need to select all the rows where current time stamp is in between the startdatetime and enddatetime. Note that the datatype is smalldatetime. How to do this?

View 1 Replies

.net - Convert Type1 To Type2 Using LINQ With Subselect Projection?

Mar 3, 2011

In the following code I want the project Id and name of TList and cast them to List. How do I do that?

List<ListItem> nameItems = new List<ListItem>();
TList<ProductCode> items = GetAllProductCode();
//WANT TO SUBSELECT ID, NAME OF ITEMS IN nameItems
nameItems = (from item in items select new (item.Id, item.Name)).Cast<ListItem>();

View 1 Replies

DataSource Controls :: Linq To Entities - Multilevel Projection Into Business Class And Not Breaking Deferred Execution?

Mar 18, 2010

I have a problem. (this a simplfied example)

In Entity framework I have a class which is effectively

fooEntity
{
public Guid Id {get; set;}
and a collection of fooChildEntity
}
a fooChildEntity is again an entityframework class
fooChildEntity
{
public Guid kidId {get; set;}
}

Now I also have a pair of business layer classes foo and fooChild

foo
{
public Guid Id {get; set;}
ilist<fooChild> Children {get;set;}
}
fooChild
{
public Guid kidId {get; set;}
}

My aim is to write a linq to entites that will allow me to convert the entity foo and children into the business foo and children without breaking deferred execution ( I will be adding filters to reduce the recordset at a higher coding level in the business layer)

doing something like

this.context.fooEntity

.include(fooChildEntity)

.Select( fe => new foo { Id=fe.Id ,

fe.foreach(fec => Children.add( new fooChild { kidId = fec.kidId}))})

.AsIQueryable()

is plainly rubbish and would never compile - it is however an indication of the direction I was thinking .

Even if I got a foreach to work like that or similar it would break deferred execution

At this point there are around 300,000 foo entities which I will eventualy filter to 5 or 6 foo's - this is why deferred execution is needed.

View 1 Replies

Looking For Best Way To Handle Data Persistence

Apr 2, 2010

I am writing a site with six pages that use the same 12 pieces of data for x number of people. The user always goes to a fixed page where I do all of the DB related work to get the 12 pieces of data for x number of people. However, I don't want to do the DB related work again as it is overhead intensive. So after the initial page I end up with something like this:

Person1, Data1, Data2,Data3,.......Data12
Person2, Data1, Data2, Data3........Data12
[code]...

I have been trying to figure out the best way to store the data so that I can use the data set throughout the remaining 5 pages. I thought of setting up an array within a class but I keep getting a null value when I try to access that class values (maybe I have it set up wrong). I thought using a session variable to store the array, but because it is multi dimensional I am having issues (again, most likely due to a lack of knowledge). I thought perhaps storing the array into a temp SQL table would be efficient, because then it would be a single read out to SQL to get the datatable containing the data back into the page, but that seems like a lot of work for something that should be easier.

View 5 Replies

How To Use Persistence To Maintain State / Relationship

Nov 29, 2010

I have to create a very simple database driven website ( for a project ) with basic features like a login system, etc. I have completed most of the basic tasks required, but there is one section that is asking me to 'Use persistence to maintain state/relationship'.

I have read a few articles and videos about persistence but I don't understand its benefits and why and how it should be used. Can anyone point me towards a site that explains how to implement state persistence in a simple way. I don't need anything advanced just a very simple way of integrating this into a very simple site to say its been done.

View 1 Replies

Security :: Losing Persistence Using Forms Authentication?

Feb 13, 2011

I have had a website on a shared web hosting plan for over a year with no issues with keeping persistence. It's been prettys stable, and the only drawback of the host I am using is that it's very slow on occasion...sometimes taking 5-10 seconds to load a page.

So over the last few weeks, I went searching for another web host and and testing one out now.So while my existing website is still running the old web host, I copied the code and data and pushed it on the new web host. It's up and running, but I noticed that shortly after I log in (Forms Authentication), I am logged off within 20-30 seconds.I decided to add the machineKey to the web.config, and it seems to have fixed it.

My question is why would this have fixed it? I asked if the host's servers were in a web farm.

View 5 Replies

Dynamic - Dynamically Loading Controls And Persistence?

Sep 1, 2010

I am loading a series of controls in the Page_Load event. However, I have to recreate those controls each page load, which means storing their data elsewhere. This is cumbersome.

protected void Page_Load(object sender, EventArgs e)
{
MyControl control = (MyControl)LoadControl(...);
control.Initialize(GlobalClass.controlData);
//^gives the control the data it had previously.
//Or use ViewState["controlData"] if serializable.
Controls.Add(control);
}

I feel like I should be using if (!IsPostBack) {}, but I don't know how, or why. In contrast, if I place the controls into the markup, then the controls seem to stay persistent. For example, a button in mark-up will remember any changes to its Text property (I think?).

<asp:Button ID="buttonText" runat="server"
Text="Text Segment" onclick="buttonText_Click" />

How do I maintain some sort of persistence with dynamically added controls, like controls added via mark-up? This would save me much work and frustration.

(I've coded for a small eternity, but the more I do ASP.NET, the more confused I become. Which is exactly the opposite of what how I understood learning to work :-P.)

View 2 Replies

Web Forms :: User Controls With HTML Elements And Persistence?

Jan 4, 2010

I have created a Web User Control (e.g, uc.ascx) which has a few HTML checkboxes in it (using Input Checkbox).

As uc.ascx is dynamically created in my webform page (e.g. page1.aspx), I discovered that the HTML checkboxes did not persist their "Checked" status. how I can make these HTML checkboxes persist?

View 1 Replies

State Management :: Stopping ViewState Persistence On Dynamic Controls?

Oct 15, 2010

I have a set of dynamically-created (IE: by code) controls on my web page. Depending on which options the user decides to go (Edit/New), those controls are re-created with the appropriate information (IE: "with values" with Edit, "without values" with New).

Here's the situation:

- I create my controls in InitComplete when it comes to save the data (both on Edit/New) contained within the controls.

- I create my controls in PreLoad when it comes to load them initially (Both on Edit/New) in order to avoid the ViewState to kick in.

However, despite creating the controls after the ViewState has been applied (technically), the controls still somehow retain the pre-postback's information. IE: if I have options 2 and 4 selected and I choose "New", which should show the options without being selected, they remain selected no matter what. And this is true despite changing their values in the PreLoad state. From my understanding, creating a control in this fashion and at that point in the page lifecycle should override any values the ViewState might have had for those controls. I have also tried to disable the parent's control viewstate (Table.EnableViewState = false) again, to no avail.

I've tried using the Me.ViewState.clear() and Me.ClearChildViewSate prior to loading the initial values as well, but again all for naught. I do understand that any control created after the Init phase of the lifecycle has to play "catchup" with the current state, however I would expect that clearing the ViewState prior to creating the controls would fix this issue. It doesn't seem to.

View 1 Replies

Web Forms :: Finding Generic Tutorial On Persistence Data Access Layers?

Mar 26, 2010

where I can find a good generic tutorial on persistence data access layers?

View 2 Replies

DataSource Controls :: DTS - Choosing Mdf File As Destination

May 19, 2010

I've wasted two hours of sleep on a stupid problem. I have an excel 2003 file (xls) that I'd like to import into a table in Sql Server 2008 Express edition. I've done this before, but I can't remember how it's done really. Here's the problem: When I start DTS, I set the excel file as the "data source" and click Next. Now I'm supposed to name/point to the mdf file, but how do I do that? The only thing that appears in the "Server name" text field is the computer's nameSQLEXPRESS, but the mdf file is of course residing in the web site's folder. Also, what should I choose in the "Destination" drop down menu: SQL Server Native Client 10, Micorsoft OLE DB Provider for SqlServer, or what? Regardless of what I choose, I don't find my mdf file in the "Database" drop down menu below . What am I doing wrong? I imagine it's really easy!

View 6 Replies

Databases :: Choosing A Proper Back End For Web Application?

Jun 4, 2010

I have a client requirement wherein client needs a web Application. My team has decided to build it with ASP.Net Using C# as front end. Now my problem here is, client has back end as MS Access and due which numbers of users that are allowed to connect simultaneously to application is restricted to 15-20 users at the most. But client have big number of users who will accessing the site simultaneously.

View 3 Replies

C# - Choosing The Language And Framework For Undergraduate Project?

Apr 4, 2011

I am a final year computer science student from Mumbai University, India.The topic of our undergraduate project is SOA.Under this project we are supposed to build 3 service components and one example website that uses those components.I am quite good with Java and have no experience whatsoever with C# or .NET.I am having hard time deciding the language and platform for our project.Can you please suggest what platform I should go for?Please give me a brief comparison between Java/J2EE and C#.NET/ASP.NET in terms of complexity, ease of development, ease of deployment etc.Edit:The original reason why I put this question is:-

We have to do final year project in group of three. My both partners want to do this project in C# and asp.net and I want to do it in java. Since our project is more of server side, java holds some advantages like cross platform over C#Also this point:-What if we implement 2 parts in C#.net(which they will build) and 1 part in Java(which i will build) and then use them to build a sample website.What level(kind) of difficulty it will accompany?

View 6 Replies

DataContext Not Visible When Choosing Data Source For LinqDataSource?

Apr 1, 2010

I have a page on which I've thrown a LinqDataSource and a GridView. I've created a DataContext LINQ-to-SQL class called dcResidents.dbml. When I attempt to configure the LinqDataSource to utilize the dcResidents data context - it doesn't appear in the list of options...though under class view (tab in VS) it does appear.
I do have several other working datacontexts - why is this one not being recognized by VS?

View 3 Replies

Web Forms :: CheckListBox - Choosing Selected Value From Items Saved To Database?

Feb 28, 2011

I am returning records from the database and I need to compare those records against my checklist box to determine which ones should be checked.

Query is working properly and returning 3 records.

Vehicle ID = 40, Option ID = 1
VehicleID = 40, Option ID = 36
VehicleID = 40, Option ID = 37

[Code]....

This is not working, can anyone point me in the right direction???

View 7 Replies

Web Forms :: Choosing Items In DropDownList Due To Large Number Of Records

Jul 13, 2012

I follow the following link for add dropdownlist in gridview.Adding Dynamic Rows in GridView with DropDownLists in ASP.Net..In this template field the drop down list contain 500 items how can i search the paticular item

View 1 Replies

C# - What Are The Pros/cons Of Choosing Between Static And Instance Data Access Classes In A Web App

Jan 20, 2010

I've read several other questions on this topic (here, here, and here), but have yet to see a great answer. I've developed my fair share of data access layers before and personally prefer to use instance classes instead of static classes. However, it is more of a personal preference (I like to test my business objects, and this approach makes mocking out the DAL easier). I have used static classes to access the database before, but I've always felt a little insecure in the appropriateness of such a design (especially in an ASP.NET environment).

Can anyone provide some good pros/cons with regards to these two approaches to developing data access classes with ADO.NET providers (no ORM), in an ASP.NET application in particular. Feel free to chime in if you have some more general static vs. instance class tips as well.

In particular, the issues I'm concerned about are:

Threading & concurrency
Scalability
Performance
Any other unknowns

View 4 Replies

Data Controls :: Prevent User From Choosing Default Item In DropDownList

Jan 1, 2013

I have a dropdownlist for categories. 

DataTextField = "Name";
DataValueField = "ID";
drp.Items.Clear();
drp.Items.Add(new ListItem("--select category--", ""));
drp.AppendDataBoundItems = true;

ID is int and I've got this

drpsub.Items.Add(new ListItem("--select category--", ""));

I want to insert some information plus ID in databaseeverything is ok when user select category from dropdownlist (for example: India, Iran, China) but when the userchoose    --select category--     she face an error because the value here is  ""  not an ID(int value)how can i don't let user choose --select subcategory--   ?

View 1 Replies

Crystal Reports :: Choosing Specific Dataset For Server Side PrintToPrinter Method?

Nov 11, 2010

I'm currently using VS 2008 and I am trying to make my web application to print only 1 specific data set from my SQL database.

For example, i got 3 rows of data sets, how can I choose only 1 data set to be printed?

string reportPath = Server.MapPath("CrystalReport2.rpt");

View 1 Replies

Web Forms :: Choosing Return Type When Stored Procedure Is Called From Entity Framework

Sep 16, 2012

I have a stored procedure in SQl and i am calling through Entity framework through import functions. Stored procedure is returns columns from 2 different tables.. now what should be return type at Entity framwork end ?

View 1 Replies

Security :: Choosing The Provider For Security Membership?

Feb 9, 2010

I have started to implement asp membership. I go the administration page and click provider. I have a database on a server on the local network that i want to install my members tables in. When i run the

aspnet_regsq.exe it doesn't ask me what SQL database i want to use and seems to default to my local SQL Server 2005 installation. How I change this to use my SQL Express database on a local server?

View 6 Replies

How To Use Workflow Engine?

Jan 27, 2010

I know workfow engine is, but actually in our programming life, how can we get use of the workflow engine ?
How will workflow engine

View 3 Replies

Is It Possible To Use Razor View Engine Outside

Sep 2, 2010

If I look at the Razor View Engine, then I see a very nice and concise syntax that is not particularly tied to generating html. So I wonder, how easy would it be to use the engine outside asp.net in a "normal" .net environment for example to generate text, code,...

View 3 Replies

Web Forms :: How To Add Search Engine

Aug 25, 2010

I had gone thru many discussions re: search engine & didn't get the answer to what i intend to design. I intend to put the search textbox & button to the masterpage so that whatever page the user is within the website, he/she can do the search.

I've been following the example (SearchDotNet) in the developerfusion but I just can't figure how I'll make it to redirect to the searchsite from the page the user triggers the search. Do I put the codes in the masterpage?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved