@ntohl Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
Trying to move from OData v3 to OData v4. Why do I keep getting a 404 when trying to use OData Functions?
Web API Config:
ODataModelBuilder builder = new ODataConventionModelBuilder();
//etc
builder.EntitySet<LocalizableString>("LocalizableStringApi");
//etc
var getComparitiveTableFunction = bu...
I have an OData v4 action method which is not working; note however that it was working fine in OData v3 (I am obviously in the process of trying to update my project)
OData Action Method:
[HttpPost]
public Translation Translate(ODataActionParameters parameters)
{
// Implementation
}
Conf...
I've started including OData in my WebAPi2 project (currently hosted in IIS8 Express on my dev machine). My OData config class looks like this:
public class ODataConfig
{
private readonly ODataConventionModelBuilder modelBuilder;
public ODataConfig()
{
modelBuilder = new ODa...
@Failsafe I have in the if an else that inserts the row if it is not equal and he inserts and when he instert the count in the if changes to 3 and he compares the row with itself so it makes the if true and go inside it :/
@C4ud3x leave the column type alone, and dt.Columns.Add("Col1", typeof(List<string>));. When the column is of type combobox, and You set the DataTable's data a list of "Item1", "Item2"...
I have two simple Model classes and a ViewModel...
public class GridItem
{
public string Name { get; set; }
public int CompanyID { get; set; }
}
public class CompanyItem
{
public int ID { get; set; }
public string Name { get; set; }
}
public class ViewModel
{
public ViewMod...
The culture outgrows what the mods are comfortable with, mods cannot or will not adapt to the fact that cultures grow in their community, drama happens, people get upset.
But no seriously, if anybody is suffering from wpf, do join us over there for specialized help. We do go off topic but generally you can find a lot of wpf specific help in there
@Amy I completely agree and I only joined back in because I felt mod was in the wrong. While the chat may have offended him and he may have had every right to do something at a personal level, the fact that I couldn't find anything offending in half an hour transcript before freeze but multiple people explaining that it is not really meant to offend
@Sippy @Amy nailed it here. You can still be the room you are, you just also need to be willing to listen and adjust when asked. Having both parties not listening to each other results in issues drama.
@DanielDawes heh WPF can be a torture when it's not tamed properly :D I've personally suffered at its hands but now its like fire.. it's tamed and I love my roast!
@Sippy It goes both ways which is why the room is now unfrozen. The mods discussed what happened and opened the room. But they need to make judgment calls in the moment, good or bad.
okay i've got a RESTful question. i've got a resource identified by /request/{id}. I have a POST method that updates the request resource, and a DELETE that deletes. i need an API method to update requests en masse though. What would that endpoint be? Would /request work with an HTTP verb "UPDATE-THEM-ALL"?
ntohl, do join us over there too then. We get a lot of people moving from winforms to wpf so many in there can help with migration whenever you choose to do that
@Sippy At that time, the mod felt that was the right action - right or wrong, they made a judgment call which is part of their job. But seriously, I'd strongly suggest discussing this on MSO. Most mods are more than happy to explain their reasoning for actions.
If I have a poco:
public class Order
{
public int Id { get; set; }
public decimal Shipping { get; set; }
public decimal Tax { get; set; }
public decimal Total { get; set; }
public IEnumerable<Product> Products { get; set; }
}
If I'm doing a SqlDataReader call, and I simply do:
if (matchColumnToProperty != null)
if (!reader.IsDBNull(reader.GetOrdinal(matchColumnToProperty)))
typeof(TEntity).GetProperty(matchColumnToProperty).SetValue(model, reader.GetValue(reader.GetOrdinal(matchColumnToProperty)), null);
@Greg It sets the value of the property for the given instance (in this case model). Basically as though you were setting model.<whatever the property name would be> = reader.GetValue(...), except dynamically using reflection
Well I'm not sure what you mean by nested, but seeing as you're dealing with an IEnumerable<> it depends, are you assigning a collection to that property or are you trying to manipulate an existing collection
Suggestion when handling ~offensive~ content: adjust to a sane level and not to the most easily offended people on this planet. There are people who spend a large % of their time looking for things to be offended about. Maybe to be heroes on twitter idk.
@bluefeet Today's Headline: Programmer couldn't wait 10 minutes to start drinking during happy hour, left work drunk and fired. Claimed "the booby made me do it"
if you want to set nested values, you will have to get the property, get its value, then get a property on that object, and get a property on that object, then set the value
get the top level property, get its value. repeat. repeat. walk down the object graph following each property. when you get to where you want to be, you can set the value