This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using MyDTOs; | |
using MyManager; | |
using Microsoft.AspNetCore.Mvc; | |
namespace MyApp.Controllers | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MyDBContext.Models; | |
using MyDTOs; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace MyManager | |
{ | |
public interface IInfoManager | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using MyBusinessLogic; | |
using MyDBContext.Models; | |
using MyDTOs; | |
namespace MyManager | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace MyDTOs | |
{ | |
public class RecursosInfo | |
{ | |
public int RecursoID { get; set; } | |
public string Nombre { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MyDBContext.Models; | |
using Microsoft.EntityFrameworkCore; | |
namespace MicrobiologiaBusinessLogic | |
{ | |
public class RecursosRepository : IRecursosRepository, IDisposable | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MyDBContext.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace MyBusinessLogic | |
{ | |
public interface IRecursosRepository: IDisposable | |
{ | |
void InsertRecurso(Recursos recurso); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
{ | |
if (!optionsBuilder.IsConfigured) | |
{ | |
IConfigurationRoot configuration = new ConfigurationBuilder() | |
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory) | |
.AddJsonFile("appsettings.json") | |
.Build(); | |
optionsBuilder.UseMySql(configuration.GetConnectionString("MicrobiologiaDatabase")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Logging": { | |
"IncludeScopes": false, | |
"Debug": { | |
"LogLevel": { | |
"Default": "Warning" | |
} | |
}, | |
"Console": { | |
"LogLevel": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sortTable(prop: string) { | |
this.path = prop.split('.'); | |
this.order = this.order * (-1); | |
return false; | |
} | |
getIcon(prop:string): string{ | |
//Yo uso iconos font-awesome de ahí la nomenclatura | |
var iconClass = "fa fa-sort"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<ul> | |
<li (click) = "sortTable('name')"> | |
nombre | |
<i [class]="getIcon('name')" aria-hidden="true"></i> | |
</li> | |
<li (click) = "sortTable('lastname')"> | |
apellidos | |
<i [class]="getIcon('lastname')" aria-hidden="true"></i> | |
</li> |