Skip to content

nikitaignatov/x-editable-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

x-editable-net

This library supports x-editable updates with EntityFramework.

public class DefaultRequest
{
    public int pk { get; set; }
    public string name { get; set; }
    public string value { get; set; }
    public string entity { get; set; }
}

Api endpoint for handling the updates, int the the primary key type.

[HttpPatch]
public dynamic InlineEdit([FromBody]DefaultRequest request)
{
    try
    {
        var command = new UpdateEntityCommand<int>(request.pk, request.value, request.name, exportedTypes[request.entity]);
        handler.Handle(command);
        return Ok();
    }
    catch (Exception ex)
    {
        return BadRequest($"Failed due to  {JsonConvert.SerializeObject(ex, Formatting.Indented)}");
    }
}

About

Basic implementation of inline edit API written in .Net using EF

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages