Questions tagged as 'entity-framework'

1
answer

Dropdown List coming from a table in the Database

I'm developing at asp.net- mvc and I have the following problem: I need to create a dropdown list that displays the name of the instructors registered in the Database. The CRUD is already working perfectly. I used the Entity Framework...
asked by 29.06.2015 / 17:50
1
answer

Doubt on automatic Migration with MigrateDatabaseToLatestVersion

With automatic migration is the database updated also when some property is excluded from my model class? That is, besides adding a new attribute if something is added to my class, does it also remove it? Like the example below, I'm trying to ge...
asked by 17.09.2015 / 01:56
3
answers

Error updating data

I have a base repository where I only run CRUD. When working with one die at a time, it works normally. However, I needed to make a modification and send several records to be edited at once. But in doing so, I get an error. When you c...
asked by 12.05.2015 / 17:00
1
answer

Search SQL database in a text saved by TinyMCE

I'm using TinyMCE for text editing on my site. When I search for a word with an accent. Eg: análise , the query does not count because the bank is saved in HTML an&aacutelise . I'm using ASP.Net MVC with SQL Server.     
asked by 17.08.2015 / 17:21
1
answer

SqlServer 2012 - Column '' in table '' is of a type that is invalid for use as a key column in an index

After seeing this error when creating a NONCLUSTERED index I wondered if it would really be necessary to create this index in the following scenario: I have a table with 11 columns, a column I store a URL, ie it is a column nvarchar(300)...
asked by 14.05.2015 / 22:59
1
answer

How can I make an MVC lambda filter

I'm making a simple filter, and display the data on the page. The code I'm using is this: mt.ModelItens = db.Forecast .Where(f => (f.CanalForecast.area == idArea && f.CanalForecast.despesa == idDespesa))...
asked by 15.10.2015 / 16:52
1
answer

How to do the mapping (EntityTypeConfiguration) of this complex type?

The enumerators in my application follow the 'secure enumerator' design pattern, where I have the enumerator declaration as static members, and the enumerators instance following a contract (IEnumeratorSecure interface). This is the default i...
asked by 16.07.2015 / 13:35
1
answer

Attach many objects with id = 0

Good morning, people, On my system here at work I have the following architecture: A PROJECT (which has some information) is composed of several PARTS. The parts are very different from each other. One, for example part 1, has several attache...
asked by 08.06.2015 / 15:34
1
answer

How do I search for the record when the table has composite primary key?

I have in my database the table t_command_control . This table has a composite primary key formed by the CD_STATION and CD_COMMAND fields. If the primary key was simple (just as CD_STATION field) I would use the...
asked by 30.11.2014 / 18:50
1
answer

Model in sessions

I have a GRID (table) that when selecting an item through the ID I load the entity in a session via ajax. public static class Sessoes { public static Produto Produto { get { return (P...
asked by 20.08.2014 / 15:32