Multiple Models in an Asp.Net MVC#

Asked

Viewed 195 times

0

I’ve had a question for a month. I have 2 tables or Models and I want the view to be manipulated, such as: view your data as they leave the BD and also insert data in the same tables. I saw many tips but none was complete. Someone can help me?

  • What code have you made so far?

  • namespace project. Models { using System; using System.Collections.Generic; public partial class usuarios { public string usuario { get; set; } public System.Datetime nascimento { get; set; } public string Ticket{ get; set; } } }

  • I created a Viewmodel so using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace project. Models { general public class { public usuarios Usuarios{ get; set; } public List<usuarios> Lista_usuarios { get; set; } public products Product { get; set; } public List<product> Lista_produtos { get; set; } } }

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.