how to tell the user that a record has not been deleted because it has other entities that inherit its primary key by means of try / catch?
try
{
db.usuarios.Remove(usuario);
}
catch(?????)
{
???????
}
I want to bring only some fields of what the consultation brings me,
var result = dbContext.Cliente.Include("Contacto.Cliente").ToList();
this brings me the following:
"Objects": [
{
"IdCliente": 3,
"Identificacion": 10,
"Nombre":...
I have a driver that sends me information to download a file, currently sent json that way
public JsonResult GetXML(DownloadModel model)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
Dictionary<string, byte[...
I have a textbox, which receives a data by AJAX.
@Html.TextBox("CantidadPago", string.Format("{0:C}",0), new{@class = "form-control"})
AJAX
$.ajax({
type: 'POST',
url: '@Url.Action("CalcularCantidadPag...
I need my @Html.ActionLink(); to execute a onclick() and then I run the driver that I send as overload this is what I have.
@Html.ActionLink("Delete", "DeleteMunicipality", new { id = item.MunicipalityId }, new { @class = "btn bt...
I need to pass the selected value of a DropDownList loaded by means of a SelectList to a modal window, for that I am using this line.
@Html.LabelFor(model => model.CompañiaId, htmlAttributes: new { @class = "control-label co...
I made a form in one of the View of my project, and now I want to apply Bootstrap to give it style, is it possible to do it?
I tried it this way but without results:
<form class="form-horizontal">
<label>Nombre</label...
As I can access the tables directly, it is with the identity that I can access all the procedures as an example:
var user = await UserManager.FindByNameAsync(userName);
All those methods I use, but I see the need to call the context...
I have the following problem when I try to update the Gender object, it shows me the following error when I do the update, help
try
{
Common.Entities.Gender gender = this.genderRepository.FindGenderId(genderModel.GenderId);...
I am working with visual studio 2013 with MVC and razor , but I would like to take advantage of using the visual studio controls, such as gridview , treeview , navigator , etc.
I remember that when I work...