hextension README
This is a simple extension for amazin developers
Features
This extension provides some snippets for C# and entity framework using the hx architecture
Snippets
Common.Model
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Common.Core.Interfaces;
namespace WebhooksReceiver.Core.Models.Model {
[Table("Model")]
public partial class ModelModel : Model
{
[Key]
[Column("ID")]
public override int Id { get; set; }
$0
[Column("DTADD")]
public override DateTime? Dtadd { get; set; }
[Column("USERADD")]
public override string Useradd { get; set; }
[Column("DTUPD")]
public override DateTime? Dtupd { get; set; }
[Column("USERUPD")]
public override string Userupd { get; set; }
[Column("DTDEL")]
public override DateTime? Dtdel { get; set; }
[Column("USERDEL")]
public override string Userdel { get; set; }
[Column("ATIVO")]
public override int? Ativo { get; set; }
public override bool ValidarCreate()
{
throw new NotImplementedException();
}
public override bool ValidarDelete()
{
throw new NotImplementedException();
}
public override bool ValidarUpdate()
{
throw new NotImplementedException();
}
}
}
Common.Model.Attribute
[Column("NAME")]
public string Name { get; set; }
Common.BaseController
using Microsoft.AspNetCore.Mvc;
using Common.Application.Configurations.Attributes;
using Common.Application.Controller;
using AutoMapper;
using Common.Core.Interfaces;
namespace WebhooksReceiver.Application.Controllers.Model
{
[Route("api/[controller]")]
[ApiController]
[Permission("Model")]
public class ModelController : BaseController<ModelModel, ModelRequestDTO, ModelResponseDTO, WebhooksReceiverContext>
{
public ModelController(
IMapper mapper,
IBusiness<ModelModel> business,
ICrudService<ModelModel, ModelResponseDTO, WebhooksReceiverContext> crudService,
Notificador notificador
) : base(mapper, business, crudService, notificador)
{
}
}
}
Requirements
Vscode
1.0.0
Initial release of Hextension
| |