1. informatica San Pedro
  2. SnapDevelop
  3. Friday, 30 October 2020 19:52 PM UTC

hi appeon community:

I'm new on C#, mvc and snapdevelop.

i have a stored procedure datawindows with 4 sp' s for CRUD operation. I'm trying to generate the service and controller for this model:

<

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
using SnapObjects.Data;
using DWNet.Data;
using Newtonsoft.Json;
using System.Collections;

namespace WebAPI1.Models
{
    [DataWindow("dw_apiusuario", DwStyle.Grid)]
    [Table("Stored Procedure")]
    [DwProcedure("roa.sp_api_usuarios_b")]
    [DwUpdate(DwUpdateAction.Update, "roa.sp_api_usuario_u")]
    [DwUpdateParameter(DwUpdateAction.Update, DwArgumentSource.Column, "rut", "rut", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwUpdateParameter(DwUpdateAction.Update, DwArgumentSource.Column, "password", "password", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwUpdateParameter(DwUpdateAction.Update, DwArgumentSource.Column, "tipo_usuario", "tipo_usuario", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwUpdate(DwUpdateAction.Insert, "roa.sp_api_usuario_i")]
    [DwUpdateParameter(DwUpdateAction.Insert, DwArgumentSource.Column, "rut", "rut", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwUpdateParameter(DwUpdateAction.Insert, DwArgumentSource.Column, "password", "password", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwUpdateParameter(DwUpdateAction.Insert, DwArgumentSource.Column, "tipo_usuario", "tipo_usuario", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwUpdate(DwUpdateAction.Delete, "roa.sp_api_usuario_d")]
    [DwUpdateParameter(DwUpdateAction.Delete, DwArgumentSource.Column, "rut", "rut", UseOriginal = false, Direction = System.Data.ParameterDirection.Input)]
    [DwKeyModificationStrategy(UpdateSqlStrategy.DeleteThenInsert)]
    [UpdateWhereStrategy(UpdateWhereStrategy.KeyColumns)]
    public class Dw_Apiusuario
    {
        [PropertySave(SaveStrategy.Ignore)]
        [DwColumn("rut")]
        public int? Rut { get; set; }

        [ConcurrencyCheck]
        [StringLength(10)]
        [PropertySave(SaveStrategy.Ignore)]
        [DwColumn("password")]
        public string Password { get; set; }

        [ConcurrencyCheck]
        [PropertySave(SaveStrategy.Ignore)]
        [DwColumn("tipo_usuario")]
        public int? Tipo_Usuario { get; set; }

    }

}

>

 


snapdevelop doesn't generate all the methods, i get only Retrieve and Update and doesn't work. i tryed the Datastore and sqlmodelmapper options with no luck.
is there any way to generate the methods that will execute the DWUpdateAction Sp's?

 

i tried asociating the table to the model, but the datastore.update() modify directly the table data and doesn't execute the update sp.

Regards from Chile

 

armando herrera @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 3 November 2020 20:56 PM UTC
  2. SnapDevelop
  3. # 1

SnapDevelop 2019 R3 Beta

ASE Database is supported

In both the DataWindow Converter and DB Server Explorer, it is possible to connect to ASE (Adaptive Server Enterprise) database.

Please refer to SnapDevelop 2019R3 New Features

Regards! 

 

 

 
Comment
There are no comments made yet.
informatica San Pedro Accepted Answer Pending Moderation
  1. Monday, 2 November 2020 12:27 PM UTC
  2. SnapDevelop
  3. # 2

thanks logan

Comment
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Monday, 2 November 2020 11:04 AM UTC
  2. SnapDevelop
  3. # 3

Hi;

Kindly please report this bug via our support ticketing system to ensure it is being properly received by our tech support and tracked at: https://www.appeon.com/standardsupport/

Regards,

Logan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.