public async Task <UbigeoModel> Post(UbigeoModel entity) { _context.Set <UbigeoModel>().Add(entity); await _context.SaveChangesAsync(); return(entity); }
public async Task <UbigeoModel> Put(UbigeoModel entity) { _context.Set <UbigeoModel>().Attach(entity); _context.SetEntityState(entity); await _context.SaveChangesAsync(); return(entity); }
public static UbigeoResponse ToUbigeoResponse(UbigeoModel entity) { UbigeoResponse representation = new UbigeoResponse(); if (entity != null) { representation.Id = entity.Id; representation.Codigo = entity.Codigo; representation.Descripcion = entity.Descripcion; } return(representation); }