public async Task <IActionResult> Create([FromBody] $safeitemname$ record)
        {
            await genericRepository.AddOneAsync(record);

            // This approach assumes you will be passing a valid action name to the controller.
            return(CreatedAtAction(createdAtActionName, new { id = record.Id }, record));
        }
Exemple #2
0
 public MyToolSettings($safeitemname$ command)
 {
     m_command = command;
     $safeitemname$UserControl = new $safeitemname$UC();
     this.Content = $safeitemname$UserControl;
     this.Title   = "$safeitemname$ Tool Settings";
 }
        /// <summary>
        /// Deserializes a $safeitemname$ object from intermediate XML format.
        /// </summary>
        /// <param name="input">Location of the intermediate XML and various deserialization helpers.</param>
        /// <param name="format">Specifies the intermediate source XML format.</param>
        /// <param name="existingInstance">The strongly typed object containing the received data, or null if the
        /// deserializer should construct a new instance.</param>
        /// <returns>A deserialized $safeitemname$ instance.</returns>
        protected override $safeitemname$ Deserialize(IntermediateReader input, ContentSerializerAttribute format, $safeitemname$ existingInstance)
        {
            $safeitemname$ value = existingInstance ?? default($safeitemname$);

            // TODO deserialize $safeitemname$ fields & properties...

            return value;
        }
        /// <summary>
        /// Deserializes a $safeitemname$ object from intermediate XML format.
        /// </summary>
        /// <param name="input">Location of the intermediate XML and various deserialization helpers.</param>
        /// <param name="format">Specifies the intermediate source XML format.</param>
        /// <param name="existingInstance">The strongly typed object containing the received data, or null if the
        /// deserializer should construct a new instance.</param>
        /// <returns>A deserialized $safeitemname$ instance.</returns>
        protected override $safeitemname$ Deserialize(IntermediateReader input, ContentSerializerAttribute format, $safeitemname$ existingInstance)
        {
            $safeitemname$ value = existingInstance ?? default($safeitemname$);

            // TODO deserialize $safeitemname$ fields & properties...

            return(value);
        }
Exemple #5
0
        /// <summary>
        /// Copies the properties of this instance into the specified existing instance.
        /// </summary>
        /// <param name="exisitingInstance">An existing emitter instance.</param>
        protected override AbstractEmitter DeepCopy(AbstractEmitter exisitingInstance)
        {
            $safeitemname$ value = (exisitingInstance as $safeitemname$) ?? default($safeitemname$);

            // TODO copy implementation specific fields & properties...

            base.DeepCopy(value);

            return(value);
        }
        public async Task <IActionResult> ReplaceDocument(string id, [FromBody] $safeitemname$ record)
        {
            if (id != record.Id)
            {
                return(BadRequest());
            }

            var rec = await genericRepository.ReplaceOneAndGetAsync <$safeitemname$>(id, record);

            return(Ok(rec));
        }
Exemple #7
0
            : base(nameof($safeitemname$), services, responseManager, conversationStateAccessor, userStateAccessor, serviceManager, telemetryClient)
        {
            var dialog = new WaterfallStep[]
            {
                PromptForName,
                EndDialog
            };

            InitialDialogId = nameof($safeitemname$);
            AddDialog(new WaterfallDialog(nameof($safeitemname$), dialog));
            AddDialog(new TextPrompt($safeitemname$Responses.NamePrompt));
        }
 /// <summary>
 /// Serializes an object to intermediate XML format.
 /// </summary>
 /// <param name="output">Specifies the intermediate XML location, and provides various serialization helpers.</param>
 /// <param name="value">The strongly typed object to be serialized.</param>
 /// <param name="format">Specifies the content format for this object.</param>
 protected override void Serialize(IntermediateWriter output, $safeitemname$ value, ContentSerializerAttribute format)
 {
     // TODO serialize $safeitemname$ fields & properties...
 }
Exemple #9
0
 public $safeitemname$View($safeitemname$ controller)
 {
     _controller = controller;
     InitializeComponent();
 }
 public MyToolSettings($safeitemname$ command)
 {
     m_command            = command;
     $safeitemname$MSForm = new $safeitemname$Form();
 }
 public $safeitemname$Layout($safeitemname$ controller) : base(controller)
 /// <summary>
 /// Serializes an object to intermediate XML format.
 /// </summary>
 /// <param name="output">Specifies the intermediate XML location, and provides various serialization helpers.</param>
 /// <param name="value">The strongly typed object to be serialized.</param>
 /// <param name="format">Specifies the content format for this object.</param>
 protected override void Serialize(IntermediateWriter output, $safeitemname$ value, ContentSerializerAttribute format)
 {
     // TODO serialize $safeitemname$ fields & properties...
 }
 /// <summary>
 /// Initializes the workspace for the $safeitemname$ console
 /// </summary>
 /// <param name="console">The console using this workspace</param>
 public $safeitemname$Workspace($safeitemname$Console console) : base(console)