public UserShift Create([FromBody] UserShiftCreate value) { if (null == value) { return(null); } return(UserShift.Create(value.Shift, value.User)); }
public NDbResult <UserShift> Create([FromBody] UserShiftCreate value) { NDbResult <UserShift> result; if (null == value) { result = new NDbResult <UserShift>(); result.ParameterIsNull(); } else { result = UserShift.Create(value.Shift, value.User); } return(result); }
public NRestResult <UserShift> Create(Shift shift, User collector) { NRestResult <UserShift> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <UserShift>(); ret.RestInvalidConfig(); return(ret); } var inst = new UserShiftCreate() { Shift = shift, User = collector }; ret = client.Execute <UserShift>(RouteConsts.UserShift.Create.Url, inst); return(ret); }