Questions tagged as 'entity-framework-6'

1
answer

TransactionScope - Problem with Rollback

I need the TransactionScope to rollback if any of these foreach returns error. I added an Exception manually between 2nd and 3rd foreach to test if rollback was working, but the information saved in the 1st and 2 foreach were not...
asked by 23.10.2017 / 21:02
1
answer

Bringing other columns with GroupBy with LINQ

I have two Tables: 1st Process containing ProcessId and SituationProcessId 2nd SituationProcess containing StatusProcessId Description Templates: public class ProcessoModel { public int? ProcessoId { get; set; } public int? Si...
asked by 06.09.2017 / 16:08
1
answer

Can not be assigned because it is read-only after doing a "Join"

Controller: [HttpPost] public ActionResult Listar_Json() { var id = 5; var search = Request["search[value]"]; //Aqui pega valor digitado no input, digamos que ele digitou 100.000,01 var query = database.Posts.Join(database.Post_Metas,...
asked by 02.07.2017 / 20:51
1
answer

ASP.NET MVC How to Manipulate Table Users Using Code First

I am studying MVC ASP.NET code first . I am a beginner and I have a probably basic doubt. When you start a project, it already creates a basic application, including the User table. I happen to want to make a relationship between this User ta...
asked by 13.03.2017 / 09:47
1
answer

Return Collection of Products according to Category [closed]

I'm not able to bring the product list that has at least one related category. //Classe public class EventoConfiguracaoViewModel { public EventoConfiguracaoViewModel() { Menus = new List<MenuViewModel>(...
asked by 23.01.2017 / 16:14
1
answer

Error loading page CREATE

I have two related methods. Patrimonio and Categoria : [Table("Patrimonios")] public class Patrimonio { [Key] public Guid PatrimonioId { get; set; } public Guid CategoriaId { get; set; } [Required] [StringLen...
asked by 01.12.2016 / 04:08
1
answer

Entity Framework does not convert INTEGER from Firebird to long from C #

I'm doing some testing with Entity Framework by mapping and migrating a database from a legacy system. Scenery Where I have a table similar to this: TESTE -------------------------------------- ID INTEGER NOT NULL, NOME VARCHAR(...
asked by 13.09.2016 / 17:01
1
answer

How to set the generator (from firebird) to an Entity framework 6 model field?

For example: I have the following table: TABLE_EXAMPLO ----------- ID NAME And the following Generator: TABLE_EXAMPLO_GEN How would I map the entity so that the Entity Framework can call the generator for new record...
asked by 12.09.2016 / 20:36
1
answer

Entity Framework 6: removal method does not work

I'm trying to delete an object using the repository pattern , but the problem is that when calling the method for removal nothing happens, nor throws an exception. FinancialController.cs: [HttpPost] public ActionResult DeleteConfirmed(int...
asked by 24.08.2016 / 21:18
1
answer

How to re-create table in sql by Entityframework

I deleted a table directly from the database, I ran the update-database command in the PackManager Console, but the table was not created again. Which command should I use to recreate this table?     
asked by 14.01.2016 / 00:44